fix some bug

pull/26/head
ibuler 2015-12-05 17:55:45 +08:00
parent 34ccaeb10f
commit 0fd7b980de
2 changed files with 3 additions and 3 deletions

View File

@ -458,8 +458,8 @@ class Nav(object):
5) 输入 \033[32mG/g\033[0m\033[0m + \033[32m组ID\033[0m 显示该组下主机. 5) 输入 \033[32mG/g\033[0m\033[0m + \033[32m组ID\033[0m 显示该组下主机.
6) 输入 \033[32mE/e\033[0m 批量执行命令. 6) 输入 \033[32mE/e\033[0m 批量执行命令.
7) 输入 \033[32mU/u\033[0m 批量上传文件. 7) 输入 \033[32mU/u\033[0m 批量上传文件.
7) 输入 \033[32mD/d\033[0m 批量下载文件. 8) 输入 \033[32mD/d\033[0m 批量下载文件.
7) 输入 \033[32mQ/q\033[0m 退出. 9) 输入 \033[32mQ/q\033[0m 退出.
""" """
print textwrap.dedent(msg) print textwrap.dedent(msg)

View File

@ -96,7 +96,7 @@ def get_role_key(user, role):
with open(os.path.join(role.key_path, 'id_rsa')) as fk: with open(os.path.join(role.key_path, 'id_rsa')) as fk:
with open(user_role_key_path, 'w') as fu: with open(user_role_key_path, 'w') as fu:
fu.write(fk.read()) fu.write(fk.read())
logger.debug(u"创建新的用户角色key %s" % user_role_key_path) logger.debug(u"创建新的用户角色key %s, Owner: %s" % (user_role_key_path, user.username))
chown(user_role_key_path, user.username) chown(user_role_key_path, user.username)
os.chmod(user_role_key_path, 0600) os.chmod(user_role_key_path, 0600)
return user_role_key_path return user_role_key_path