From 1df3cb78ef27b61eb85f6570b75bb2d7c6b17e03 Mon Sep 17 00:00:00 2001 From: Laurent Bachelier Date: Thu, 9 May 2013 20:45:26 +0200 Subject: [PATCH] Allow complete paths for script This allows running any weboob script, not only those in scripts/ --- tools/local_run.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/local_run.py b/tools/local_run.py index 14c60ad6..75428c25 100644 --- a/tools/local_run.py +++ b/tools/local_run.py @@ -34,7 +34,12 @@ if p.returncode != 0: print s[0] sys.exit(p.returncode) +if os.path.exists(script): + spath = script +else: + spath = os.path.join(project, 'scripts', script) + os.execvpe( sys.executable, - ['-Wall', os.path.join(project, 'scripts', script)] + args, + ['-Wall', spath] + args, env)