Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8107ca4

Browse files
author
Skip Montanaro
committed
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.
1 parent fb15417 commit 8107ca4

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

Tools/scripts/hotshotmain.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ def run_hotshot(filename, profile, args):
3939

4040
def main(args):
4141
parser = optparse.OptionParser(__doc__)
42+
parser.disable_interspersed_args()
4243
parser.add_option("-p", "--profile", action="store", default=PROFILE,
4344
dest="profile", help='Specify profile file to use')
4445
(options, args) = parser.parse_args(args)

0 commit comments

Comments
 (0)