Commit 03d7cd1e authored by Jameson Rollins's avatar Jameson Rollins

use subprocess run instead of call

parent 6fe4c8d7
......@@ -190,7 +190,7 @@ def draw_graph(args):
with tempfile.NamedTemporaryFile(suffix=suffix, delete=False) as f:
dot.write(f.name, format=args.format)
try:
subprocess.call(viewer + [f.name])
subprocess.run(viewer + [f.name])
except OSError as e:
sys.exit("Graph viewer '%s' could not be found." % (viewer[0]))
except KeyboardInterrupt:
......@@ -326,7 +326,7 @@ def edit_system(args):
print(' '.join(cmd), file=sys.stderr)
try:
try:
subprocess.call(cmd)
subprocess.run(cmd)
except OSError:
sys.exit("Could not find editor: %s" % cmd[0])
except KeyboardInterrupt:
......@@ -369,9 +369,9 @@ network location as well (e.g. https://...)."""
git.Git(tempdir).clone(archive_path)
os.chdir(wd)
if args.shell:
subprocess.call('bash')
subprocess.run('bash')
else:
subprocess.call('gitk')
subprocess.run('gitk')
except KeyboardInterrupt:
pass
finally:
......
......@@ -136,7 +136,7 @@ composite {{
cmd += [f.name]
print(' '.join(cmd[1:]), file=sys.stderr)
try:
subprocess.call(cmd)
subprocess.run(cmd)
time.sleep(.5)
except KeyboardInterrupt:
pass
......@@ -196,7 +196,7 @@ composite {{
cmd += [f.name]
print(' '.join(cmd[1:]), file=sys.stderr)
try:
subprocess.call(cmd)
subprocess.run(cmd)
time.sleep(.5)
except KeyboardInterrupt:
pass
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment