Index: command_wrapper.py |
=================================================================== |
--- command_wrapper.py (revision 103515) |
+++ command_wrapper.py (working copy) |
@@ -72,13 +72,13 @@ |
def RunWithTimeout(timeout, func, *args, **kwargs): |
- result = None |
+ wrapper = { 'result': None } |
def CallFunc(): |
- result = func(*args, **kwargs) |
+ wrapper['result'] = func(*args, **kwargs) |
th = threading.Thread(target=CallFunc) |
th.start() |
th.join(timeout) |
- return result |
+ return wrapper['result'] |
def main(argv): |