Skip to content

Commit

Permalink
Merge pull request jumpserver#142 from jumpserver/bug_asset_upload
Browse files Browse the repository at this point in the history
fix asset upload bug
  • Loading branch information
ibuler committed Mar 22, 2016
2 parents 4dbc680 + a1e947a commit 267c1cd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion jasset/asset_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,8 @@ def excel_to_db(excel_file):
ip, port, hostname, use_default_auth, username, password, group = row
if get_object(Asset, hostname=hostname):
continue
if isinstance(password, int) or isinstance(password, float):
password = unicode(int(password))
use_default_auth = 1 if use_default_auth == u'默认' else 0
password_encode = CRYPTOR.encrypt(password) if password else ''
if hostname:
Expand All @@ -311,7 +313,6 @@ def excel_to_db(excel_file):


def get_ansible_asset_info(asset_ip, setup_info):
print setup_info, '***'
disk_need = {}
disk_all = setup_info.get("ansible_devices")
if disk_all:
Expand Down

0 comments on commit 267c1cd

Please sign in to comment.