Commit 8107ca47 authored by Skip Montanaro's avatar Skip Montanaro

Keep option parser from gobbling up the filename to be profiled and the

flags it accepts.  It's too late to change optparse's default behavior now,
but I find the default setting of allow_interspersed_args very weird.
parent fb154171
...@@ -39,6 +39,7 @@ def run_hotshot(filename, profile, args): ...@@ -39,6 +39,7 @@ def run_hotshot(filename, profile, args):
def main(args): def main(args):
parser = optparse.OptionParser(__doc__) parser = optparse.OptionParser(__doc__)
parser.disable_interspersed_args()
parser.add_option("-p", "--profile", action="store", default=PROFILE, parser.add_option("-p", "--profile", action="store", default=PROFILE,
dest="profile", help='Specify profile file to use') dest="profile", help='Specify profile file to use')
(options, args) = parser.parse_args(args) (options, args) = parser.parse_args(args)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment