diff options
author | Priit Laes <plaes@plaes.org> | 2010-08-22 11:13:33 +0300 |
---|---|---|
committer | Priit Laes <plaes@plaes.org> | 2010-08-22 11:13:33 +0300 |
commit | bbcde4a3a4bd411f143e49cf7205061360cd3e8b (patch) | |
tree | 9cad7c4bdd7523090df794b73ad440a3bbb7335f /utils/grumpy_sync.py | |
parent | Clean up request_context hacks in tests (diff) | |
download | gsoc2010-grumpy-bbcde4a3a4bd411f143e49cf7205061360cd3e8b.tar.gz gsoc2010-grumpy-bbcde4a3a4bd411f143e49cf7205061360cd3e8b.tar.bz2 gsoc2010-grumpy-bbcde4a3a4bd411f143e49cf7205061360cd3e8b.zip |
Clean up request_context hacks in utils
Diffstat (limited to 'utils/grumpy_sync.py')
-rwxr-xr-x | utils/grumpy_sync.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/utils/grumpy_sync.py b/utils/grumpy_sync.py index a0409e1..41fba51 100755 --- a/utils/grumpy_sync.py +++ b/utils/grumpy_sync.py @@ -181,9 +181,9 @@ if __name__ == '__main__': if len(args) != 1: parser.error("provide path to configuration file as first argument") sys.exit(1) - with app.test_request_context(): - app.config.from_pyfile(args[0]) - if 'GRUMPY_PORTAGE_DIR' in app.config.keys(): - portagedir = app.config['GRUMPY_PORTAGE_DIR'] - if os.path.isdir(portagedir): - main(portagedir) + app.test_request_context().push() + app.config.from_pyfile(args[0]) + if 'GRUMPY_PORTAGE_DIR' in app.config.keys(): + portagedir = app.config['GRUMPY_PORTAGE_DIR'] + if os.path.isdir(portagedir): + main(portagedir) |