From 7a225da44e56d579628f9a19fef5647a5ac3e3fa Mon Sep 17 00:00:00 2001 From: Bernhard Miklautz Date: Sat, 11 May 2019 17:33:42 +0200 Subject: [PATCH] fix: controller function invocation via shell If only a compiled version is available and a controller function is invoked with -S app/c/f an IOError is raised as '_' is used as delimiter instead of '.'. web2py.py -S test/test/test -M would lead to: IOError: [Errno 2] No such file or directory: 'applications/test/compiled/controllers_test_test.pyc' --- gluon/shell.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gluon/shell.py b/gluon/shell.py index fc64886d..bb2c0d2c 100644 --- a/gluon/shell.py +++ b/gluon/shell.py @@ -260,7 +260,7 @@ def run( if c: pyfile = os.path.join('applications', a, 'controllers', c + '.py') pycfile = os.path.join('applications', a, 'compiled', - "controllers_%s_%s.pyc" % (c, f)) + "controllers.%s.%s.pyc" % (c, f)) if ((cron_job and os.path.isfile(pycfile)) or not os.path.isfile(pyfile)): exec(read_pyc(pycfile), _env)