fix connect.py 字符报错

pull/31/head
ibuler 2015-12-30 12:36:34 +08:00
parent 6e747fa299
commit 2fa1d7a95b
1 changed files with 2 additions and 2 deletions

View File

@ -527,7 +527,7 @@ class Nav(object):
user_asset_search = user_asset_all user_asset_search = user_asset_all
self.search_result = dict(zip(range(len(user_asset_search)), user_asset_search)) self.search_result = dict(zip(range(len(user_asset_search)), user_asset_search))
color_print('[%-3s] %-12s %-15s %-5s %-10s %s' % ('ID', u'主机名', 'IP', u'端口', u'系统用户', u'备注'), 'title') color_print('[%-3s] %-12s %-15s %-5s %-10s %s' % ('ID', '主机名', 'IP', '端口', '系统用户', '备注'), 'title')
for index, asset in self.search_result.items(): for index, asset in self.search_result.items():
# 获取该资产信息 # 获取该资产信息
asset_info = get_asset_info(asset) asset_info = get_asset_info(asset)
@ -734,7 +734,7 @@ def main():
主程序 主程序
""" """
if not login_user: # 判断用户是否存在 if not login_user: # 判断用户是否存在
color_print(u'没有该用户或许你是以root运行的 No that user.', exits=True) color_print('没有该用户或许你是以root运行的 No that user.', exits=True)
gid_pattern = re.compile(r'^g\d+$') gid_pattern = re.compile(r'^g\d+$')
nav = Nav(login_user) nav = Nav(login_user)