From fe87e32e2b287b6bb454b2e0a7628566694c512e Mon Sep 17 00:00:00 2001 From: ibuler Date: Thu, 21 Jan 2016 19:37:20 +0800 Subject: [PATCH] roll back --- jumpserver/api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jumpserver/api.py b/jumpserver/api.py index d524309ba..238906537 100644 --- a/jumpserver/api.py +++ b/jumpserver/api.py @@ -64,6 +64,7 @@ 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) @@ -74,8 +75,7 @@ def get_asset_info(asset): else: info['username'] = asset.username info['password'] = CRYPTOR.decrypt(asset.password) - - info['port'] = int(asset.port) + info['port'] = int(asset.port) return info