From 5320e7e0d4b465a7c38004652c3ccf4c5b4e79c7 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Sat, 10 Dec 2016 17:11:30 -0800 Subject: add config_args option, fix nonsense options parameter --- pyramid/scripts/prequest.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pyramid/scripts/prequest.py b/pyramid/scripts/prequest.py index e4595a9cd..2025ecccc 100644 --- a/pyramid/scripts/prequest.py +++ b/pyramid/scripts/prequest.py @@ -101,6 +101,14 @@ class PRequestCommand(object): help='The path of the request.', ) + parser.add_argument( + 'config_args', + nargs='*', + default=(), + help='Arbitrary options to override those in the [app:main] section ' + 'of the configuration file.', + ) + get_app = staticmethod(get_app) stdin = sys.stdin @@ -150,7 +158,7 @@ class PRequestCommand(object): headers[name] = value.strip() app = self.get_app(app_spec, self.args.app_name, - options=self.args) + options=self.args.config_args) request_method = (self.args.method or 'GET').upper() -- cgit v1.2.3