Skip to content
Snippets Groups Projects
Commit bb1bd477 authored by Seblu's avatar Seblu
Browse files

fix bug on !

parent 8e14aa0f
No related branches found
No related tags found
No related merge requests found
......@@ -115,9 +115,13 @@ class Cli(object):
def _exec_command(self, argv):
'''Execute command'''
self.printer.debug("argv: %s"%argv)
try:
if (argv[0] == "!"):
p = subprocess.Popen(argv[1:], close_fds=True, shell=True)
if (argv[0][0] == "!"):
argv[0] = argv[0][1:]
if not len(argv[0]):
return
p = subprocess.Popen(argv, close_fds=True, shell=True)
p.wait()
ret = p.returncode
elif (argv[0] == "?"):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment