runscript: makes sure script path is searched first

This commit is contained in:
Frédéric Péters 2014-12-25 10:26:33 +01:00
parent d186543c6c
commit 26d3c95173
1 changed files with 1 additions and 1 deletions

View File

@ -39,7 +39,7 @@ class CmdRunScript(Command):
publisher.app_dir = os.path.join(publisher.app_dir, sub_options.vhost)
publisher.set_config()
fullpath = os.path.dirname(os.path.abspath(args[0]))
sys.path.append(fullpath)
sys.path.insert(0, fullpath)
module_name = os.path.splitext(os.path.basename(args[0]))[0]
sys.argv = args
runpy.run_module(module_name)