runscript: keep the script name in sys.argv (#3015)

This commit is contained in:
Benjamin Dauvergne 2013-06-05 22:20:53 +02:00
parent 3d63473d46
commit 0607c9ebff
1 changed files with 1 additions and 1 deletions

View File

@ -41,7 +41,7 @@ class CmdRunScript(Command):
fullpath = os.path.dirname(os.path.abspath(args[0]))
sys.path.append(fullpath)
module_name = os.path.splitext(os.path.basename(args[0]))[0]
sys.argv = args[1:]
sys.argv = args
runpy.run_module(module_name)
CmdRunScript.register()