Browse Source

Prevent crash when getting dynamic properties

Since `args` is a string, the `Popen` constructor interprets "/usr/bin/python myscript.py" as a path to an executable instead of "/usr/bin/python" with argument "myscript.py".
Adding `shell=True` makes this behave as expected.

Fix #584
1.0.5-release-candidate
Dan Rose 4 years ago
committed by Chris
parent
commit
9ace884cef
1 changed files with 1 additions and 1 deletions
  1. 2
      gooey/gui/seeder.py

2
gooey/gui/seeder.py

@ -12,7 +12,7 @@ def fetchDynamicProperties(target, encoding):
dynamically generated defaults with which to seed the UI
"""
cmd = '{} {}'.format(target, 'gooey-seed-ui --ignore-gooey')
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
if proc.returncode != 0:
out, _ = proc.communicate()
return json.loads(out.decode(encoding))

Loading…
Cancel
Save