From 49de7fed313cb59d70a574d7cd53a2886836be9c Mon Sep 17 00:00:00 2001 From: Jon Dufresne Date: Tue, 9 Oct 2018 19:14:55 -0700 Subject: [PATCH] Use REMAINDER for --run-script to allow passing arbitrary arguments Regression mistakenly introduced in f3dd542e3f50498798b7d15252adc019df67ba9e. --- pyprof2calltree.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pyprof2calltree.py b/pyprof2calltree.py index e68ffe8..4942c54 100755 --- a/pyprof2calltree.py +++ b/pyprof2calltree.py @@ -298,7 +298,9 @@ def main(): help="Run the kcachegrind tool on the converted data", action="store_true") parser.add_argument('-r', '--run-script', - nargs='+', metavar=('scriptfile', 'args'), dest='script', + nargs=argparse.REMAINDER, + metavar=('scriptfile', 'args'), + dest='script', help="Name of the Python script to run to collect" " profiling data") args = parser.parse_args()