Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10349)

Unified Diff: command_wrapper.py

Issue 8183010: Wrap the return result of a wrapped function. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/command_wrapper/bin/
Patch Set: Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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):
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698