diff options
| -rw-r--r-- | pyramid/scripts/proutes.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/pyramid/scripts/proutes.py b/pyramid/scripts/proutes.py index 92ec48ed1..cf3ae5e9c 100644 --- a/pyramid/scripts/proutes.py +++ b/pyramid/scripts/proutes.py @@ -273,6 +273,14 @@ class PRoutesCommand(object): help='The URI to the configuration file.', ) + parser.add_argument( + 'config_args', + nargs='*', + default=(), + help='Arbitrary options to override those in the [app:main] section ' + 'of the configuration file.', + ) + def __init__(self, argv, quiet=False): self.args = self.parser.parse_args(argv[1:]) self.quiet = quiet @@ -327,7 +335,7 @@ class PRoutesCommand(object): return 2 config_uri = self.args.config_uri - env = self.bootstrap[0](config_uri, options=vars(self.args)) + env = self.bootstrap[0](config_uri, options=parse_vars(self.args.config_args)) registry = env['registry'] mapper = self._get_mapper(registry) |
