fixes #1596, thanks Paolo Pastori

This commit is contained in:
mdipierro
2018-05-01 10:51:42 -05:00
parent 0226eb5286
commit 13ff0877fd
2 changed files with 4 additions and 2 deletions

View File

@@ -88,7 +88,7 @@ def exec_environment(
mo = re.match(r'(|.*/)applications/(?P<appname>[^/]+)', pyfile)
if mo:
appname = mo.group('appname')
request.folder = os.path.join('applications', appname)
request.folder = os.path.abspath(os.path.join('applications', appname))
else:
request.folder = ''
env = build_environment(request, response, session, store_current=False)

View File

@@ -943,7 +943,9 @@ def console():
k = len(sys.argv)
sys.argv, other_args = sys.argv[:k], sys.argv[k + 1:]
(options, args) = parser.parse_args()
options.args = [options.run] + other_args
options.args = other_args
if options.run:
options.args.insert(0, options.run)
copy_options = copy.deepcopy(options)
copy_options.password = '******'