Code Review
/
doctor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Test port data plane status on Sample Inspector
[doctor.git]
/
tests
/
utils.py
diff --git
a/tests/utils.py
b/tests/utils.py
index
41e2235
..
fd8c4cd
100644
(file)
--- a/
tests/utils.py
+++ b/
tests/utils.py
@@
-76,3
+76,15
@@
class SSHClient(object):
elif method == 'get':
ftp.get(source, dest)
ftp.close()
elif method == 'get':
ftp.get(source, dest)
ftp.close()
+
+def run_async(func):
+ from threading import Thread
+ from functools import wraps
+
+ @wraps(func)
+ def async_func(*args, **kwargs):
+ thread = Thread(target=func, args=args, kwargs=kwargs)
+ thread.start()
+ return thread
+
+ return async_func