From: Matthias Klose Date: Sun, 13 Sep 2009 15:09:24 +0000 (+0000) Subject: Issue #6635: Fix profiler printing usage message. X-Git-Tag: v2.7a1~555 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=924eab64a36735bbec080f5f0dc02bb3a773284d;p=thirdparty%2FPython%2Fcpython.git Issue #6635: Fix profiler printing usage message. --- diff --git a/Lib/profile.py b/Lib/profile.py index 27d68ba4838b..3af84278bf22 100755 --- a/Lib/profile.py +++ b/Lib/profile.py @@ -605,9 +605,9 @@ def main(): sys.exit(2) (options, args) = parser.parse_args() - sys.argv[:] = args - if (len(sys.argv) > 0): + if (len(args) > 0): + sys.argv[:] = args sys.path.insert(0, os.path.dirname(sys.argv[0])) run('execfile(%r)' % (sys.argv[0],), options.outfile, options.sort) else: diff --git a/Misc/NEWS b/Misc/NEWS index 734bddf001bc..555d96ea8f31 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -366,6 +366,8 @@ Core and Builtins Library ------- +- Issue #6635: Fix profiler printing usage message. + - Issue #6856: Add a filter keyword argument to TarFile.add(). - Issue #6163: Fixed HP-UX runtime library dir options in