summaryrefslogtreecommitdiff
path: root/morphlib/app.py
diff options
context:
space:
mode:
authorDaniel Silverstone <daniel.silverstone@codethink.co.uk>2012-09-12 12:29:07 +0000
committerDaniel Silverstone <daniel.silverstone@codethink.co.uk>2012-09-12 14:04:37 +0100
commitdd7813ca4ebcfe14429eca5a7e5530e0be349743 (patch)
tree78b49a4414c8014a0506bfd3c652b7f33753e164 /morphlib/app.py
parentda5a4968789e45d90f4b855874835d35c2614e58 (diff)
downloadmorph-dd7813ca4ebcfe14429eca5a7e5530e0be349743.tar.gz
Test the trove-* support.
This adds a way to cause the processed configuration to be dumped out. We do this in the overridden process_args method so that the configuration dumped has had all the processing done on it which is necessary. The test then uses this functionality to ensure that the repo-alias setting has been correctly updated with the Trove-hosted prefixes.
Diffstat (limited to 'morphlib/app.py')
-rwxr-xr-xmorphlib/app.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/morphlib/app.py b/morphlib/app.py
index 7d7ddeb5..d5af6ccc 100755
--- a/morphlib/app.py
+++ b/morphlib/app.py
@@ -18,6 +18,7 @@ import cliapp
import collections
import logging
import os
+import sys
import time
import warnings
@@ -169,6 +170,9 @@ class Morph(cliapp.Application):
# treat settings['repo-alias'] as the sole source of prefixes for git
# URL expansion.
self.settings['repo-alias'] = morphlib.util.combine_aliases(self)
+ 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):