From cd84f0d5c612052d41c162de5627e5877d052cc5 Mon Sep 17 00:00:00 2001 From: ibuler Date: Sat, 1 Nov 2014 16:16:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8B=96=E5=8A=A8=E7=AA=97?= =?UTF-8?q?=E5=8F=A3=E5=85=B3=E9=97=AD=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jumpserver.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/jumpserver.py b/jumpserver.py index d4754b33f..7fec336a5 100755 --- a/jumpserver.py +++ b/jumpserver.py @@ -247,7 +247,7 @@ def exec_cmd_servers(username): ip_all, ip_all_dict = ip_all_select(username) no_perm = set(hosts)-set(ip_all) if no_perm: - print "You have no permission on %s." % list(no_perm) + print "You have NO PERMISSION on %s..." % list(no_perm) continue print '\nInput the \033[32mCommand\033[0m , The command will be Execute on servers, q/Q to quit.\n' while True: @@ -288,7 +288,11 @@ if __name__ == '__main__': print_prompt() try: while True: - option = raw_input("\033[1;32mOpt or IP>:\033[0m ") + try: + option = raw_input("\033[1;32mOpt or IP>:\033[0m ") + except EOFError: + print + continue if option in ['P', 'p']: print_your_server(username) continue