From ee06b9015e78e89da8d31c6d9ee0d7445d0855e9 Mon Sep 17 00:00:00 2001 From: Yoan Mollard Date: Mon, 24 Apr 2017 20:11:15 +0200 Subject: [PATCH] Exit the worker command when not connected --- psiturk/psiturk_shell.py | 1 + 1 file changed, 1 insertion(+) diff --git a/psiturk/psiturk_shell.py b/psiturk/psiturk_shell.py index 7378c6bda..6722a258b 100644 --- a/psiturk/psiturk_shell.py +++ b/psiturk/psiturk_shell.py @@ -678,6 +678,7 @@ def worker_list(self, submitted, approved, rejected, chosen_hit): workers = self.amt_services.get_workers() if workers is False: print colorize('*** failed to get workers', 'red') + return if chosen_hit: workers = [worker for worker in workers if \ worker['hitId'] == chosen_hit]