diff --git a/src/clc/APIv2/queue.py b/src/clc/APIv2/queue.py index 712ac2d..f178f80 100644 --- a/src/clc/APIv2/queue.py +++ b/src/clc/APIv2/queue.py @@ -143,7 +143,7 @@ def WaitUntilComplete(self,poll_freq=2,timeout=None): elif status in ("failed", "unknown"): self.error_requests.append(request) self.requests = cur_requests - if self.requests > 0 and clc.v2.time_utils.TimeoutExpired(start_time, timeout): + if len(self.requests) > 0 and clc.v2.time_utils.TimeoutExpired(start_time, timeout): raise clc.RequestTimeoutException('Timeout waiting for Requests: {0}'.format(self.requests[0].id), self.requests[0].Status())