]> granicus.if.org Git - python/commitdiff
Issue #6635: Fix profiler printing usage message.
authorMatthias Klose <doko@ubuntu.com>
Sun, 13 Sep 2009 15:09:24 +0000 (15:09 +0000)
committerMatthias Klose <doko@ubuntu.com>
Sun, 13 Sep 2009 15:09:24 +0000 (15:09 +0000)
Lib/profile.py
Misc/NEWS

index 27d68ba4838b6b3a08c5311009463921acfbb6cf..3af84278bf2284af9933a0c3fb16a005196f4f35 100755 (executable)
@@ -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:
index 734bddf001bc5816df006dabd0548dc09101f77f..555d96ea8f31f11ea597ca475717ee318e3932f7 100644 (file)
--- 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