Use subproctools.print_command.
This commit is contained in:
parent
a8314990f2
commit
1359ab040e
1 changed files with 11 additions and 6 deletions
13
rarpar.py
13
rarpar.py
|
@ -10,6 +10,7 @@ import time
|
||||||
from voussoirkit import betterhelp
|
from voussoirkit import betterhelp
|
||||||
from voussoirkit import bytestring
|
from voussoirkit import bytestring
|
||||||
from voussoirkit import pathclass
|
from voussoirkit import pathclass
|
||||||
|
from voussoirkit import subproctools
|
||||||
from voussoirkit import vlogging
|
from voussoirkit import vlogging
|
||||||
from voussoirkit import winglob
|
from voussoirkit import winglob
|
||||||
from voussoirkit import winwhich
|
from voussoirkit import winwhich
|
||||||
|
@ -279,13 +280,17 @@ def run_script(script, dry=False):
|
||||||
'''
|
'''
|
||||||
status = 0
|
status = 0
|
||||||
|
|
||||||
if dry:
|
|
||||||
for command in script:
|
for command in script:
|
||||||
|
if isinstance(command, str):
|
||||||
|
print(command)
|
||||||
|
elif isinstance(command, list):
|
||||||
|
subproctools.print_command(command)
|
||||||
|
else:
|
||||||
print(command)
|
print(command)
|
||||||
return status
|
|
||||||
|
|
||||||
for command in script:
|
if dry:
|
||||||
print(command)
|
continue
|
||||||
|
|
||||||
if isinstance(command, str):
|
if isinstance(command, str):
|
||||||
status = os.system(command)
|
status = os.system(command)
|
||||||
elif isinstance(command, list):
|
elif isinstance(command, list):
|
||||||
|
|
Loading…
Reference in a new issue