Explicitly check event state after waiting.
In python2.6, the wait function always returns None, so explicitly check the status of events after waiting with a timeout. Change-Id: Ie354c1841c49725c93aa8ddf1c04f0e9a9b56548
This commit is contained in:
parent
4bc883e9f3
commit
8336e63685
@ -75,7 +75,8 @@ class Task(object):
|
||||
response has been received (default: None).
|
||||
"""
|
||||
|
||||
return self._wait_event.wait(timeout)
|
||||
self._wait_event.wait(timeout)
|
||||
return self._wait_event.is_set()
|
||||
|
||||
|
||||
class SubmitJobTask(Task):
|
||||
@ -349,7 +350,8 @@ class AdminRequest(object):
|
||||
self.wait_event.set()
|
||||
|
||||
def waitForResponse(self, timeout=None):
|
||||
return self.wait_event.wait(timeout)
|
||||
self.wait_event.wait(timeout)
|
||||
return self.wait_event.is_set()
|
||||
|
||||
|
||||
class StatusAdminRequest(AdminRequest):
|
||||
|
Loading…
x
Reference in New Issue
Block a user