Skip to content

Commit

Permalink
修改推送默认端口bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ibuler committed Jan 21, 2016
1 parent 36bfb50 commit 1c2cba6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jumpserver/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ def get_asset_info(asset):
info = {'hostname': asset.hostname, 'ip': asset.ip}
if asset.use_default_auth:
if default:
info['port'] = int(default.field2)
info['username'] = default.field1
try:
info['password'] = CRYPTOR.decrypt(default.field3)
Expand All @@ -73,10 +72,11 @@ def get_asset_info(asset):
if os.path.isfile(default.field4):
info['ssh_key'] = default.field4
else:
info['port'] = int(asset.port)
info['username'] = asset.username
info['password'] = CRYPTOR.decrypt(asset.password)

info['port'] = int(asset.port)

return info


Expand Down

0 comments on commit 1c2cba6

Please sign in to comment.