diff options
author | Richard Maw <richard.maw@codethink.co.uk> | 2013-06-06 09:56:42 +0000 |
---|---|---|
committer | Richard Maw <richard.maw@codethink.co.uk> | 2013-06-06 09:58:41 +0000 |
commit | 30f53a3023fe978bf757d84d36be712e5fa2a126 (patch) | |
tree | ed5b29cde44e08a1d2cfd4c6175e7d823c2e4ca1 /morphlib | |
parent | a1e2ee625ad5d865f7d63a86f8821e1bd18d2096 (diff) | |
download | morph-30f53a3023fe978bf757d84d36be712e5fa2a126.tar.gz |
process_args: Move directory creation to after dump config
I put my directory creation logic there, since it's an unintended
side-effect to create the directories if all you want to do is
dump the config.
Diffstat (limited to 'morphlib')
-rw-r--r-- | morphlib/app.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/morphlib/app.py b/morphlib/app.py index b4d316e8..9ae177f5 100644 --- a/morphlib/app.py +++ b/morphlib/app.py @@ -219,6 +219,10 @@ class Morph(cliapp.Application): tmpdir = os.path.join(tmpdir_base, 'morph_tmp') self.settings['tempdir'] = tmpdir + if 'MORPH_DUMP_PROCESSED_CONFIG' in os.environ: + self.settings.dump_config(sys.stdout) + sys.exit(0) + def create_dir_if_not_exists(dir): if not os.path.exists(dir): os.makedirs(dir) @@ -232,10 +236,6 @@ class Morph(cliapp.Application): create_dir_if_not_exists(self.settings['cachedir']) - if 'MORPH_DUMP_PROCESSED_CONFIG' in os.environ: - self.settings.dump_config(sys.stdout) - sys.exit(0) - cliapp.Application.process_args(self, args) def setup_plugin_manager(self): |