Allow complete paths for script
This allows running any weboob script, not only those in scripts/
This commit is contained in:
parent
a0abba9810
commit
1df3cb78ef
1 changed files with 6 additions and 1 deletions
|
|
@ -34,7 +34,12 @@ if p.returncode != 0:
|
||||||
print s[0]
|
print s[0]
|
||||||
sys.exit(p.returncode)
|
sys.exit(p.returncode)
|
||||||
|
|
||||||
|
if os.path.exists(script):
|
||||||
|
spath = script
|
||||||
|
else:
|
||||||
|
spath = os.path.join(project, 'scripts', script)
|
||||||
|
|
||||||
os.execvpe(
|
os.execvpe(
|
||||||
sys.executable,
|
sys.executable,
|
||||||
['-Wall', os.path.join(project, 'scripts', script)] + args,
|
['-Wall', spath] + args,
|
||||||
env)
|
env)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue