Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

run_cmd can take list of commands as input #32

merged 1 commit into from Oct 14, 2012
Jump to file or symbol
Failed to load files and symbols.
+6 −0
@@ -1158,6 +1158,12 @@ def run_cmd(cmd, block=False, mimode=True, timeout=10):
timeoutcount = timeout/0.001
+ ### handle a list of commands by recursively calling run_cmd
+ if isinstance(cmd, list):
+ for c in cmd:
+ run_cmd(c, block, mimode, timeout)
+ return count
if mimode:
count = count + 1
cmd = "%d%s\n" % (count, cmd)