From 271f2af93e5a660cf3f0b6ade995c19035c40e88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Sch=C3=BCtz?= Date: Mon, 2 Jan 2017 22:38:51 +0100 Subject: [PATCH] minor fixes --- kickthemout.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/kickthemout.py b/kickthemout.py index 0c9e645..fb55aba 100644 --- a/kickthemout.py +++ b/kickthemout.py @@ -131,16 +131,14 @@ def kicksomeoff(): while not canBreak: try: choice = raw_input("\nChoose devices to target(comma-separated): ") - canBreak = True + if ',' in choice: + some_targets = choice.split(",") + canBreak = True + else: + print("\n{0}ERROR:{1} Please select more than 1 devices from the list.{2}\n").format(RED, RED, END) except KeyboardInterrupt: return - if ',' in choice: - some_targets = choice.split(",") - else: - print("\n{0}ERROR:{2} Please select more than 1 devices.{3}\n").format(RED, RED, END) - return - some_ipList = "" for i in some_targets: try: