summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Piercy <web@stevepiercy.com>2016-12-10 17:11:30 -0800
committerSteve Piercy <web@stevepiercy.com>2016-12-13 17:39:41 -0800
commit5320e7e0d4b465a7c38004652c3ccf4c5b4e79c7 (patch)
tree23c0ae1c295ad75e3ad3c54454ecdf6cb4238d89
parentbe51e57ac1f423579dc7426f93e957e3bf8ef450 (diff)
downloadpyramid-5320e7e0d4b465a7c38004652c3ccf4c5b4e79c7.tar.gz
pyramid-5320e7e0d4b465a7c38004652c3ccf4c5b4e79c7.tar.bz2
pyramid-5320e7e0d4b465a7c38004652c3ccf4c5b4e79c7.zip
add config_args option, fix nonsense options parameter
-rw-r--r--pyramid/scripts/prequest.py10
1 files changed, 9 insertions, 1 deletions
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()