]> granicus.if.org Git - python/commitdiff
Merged revisions 74773 via svnmerge from
authorMatthias Klose <doko@ubuntu.com>
Sun, 13 Sep 2009 15:12:47 +0000 (15:12 +0000)
committerMatthias Klose <doko@ubuntu.com>
Sun, 13 Sep 2009 15:12:47 +0000 (15:12 +0000)
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r74773 | matthias.klose | 2009-09-13 17:09:24 +0200 (So, 13 Sep 2009) | 2 lines

  Issue #6635: Fix profiler printing usage message.
........

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 d81de709981959f63dfeae4e215faaccb6f25944..5b2247997b45dc419af6dece9f79b9cebc5b8ab5 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -74,6 +74,8 @@ Core and Builtins
 Library
 -------
 
+- Issue #6635: Fix profiler printing usage message.
+
 - Issue #6795: int(Decimal('nan')) now raises ValueError instead of
   returning NaN or raising InvalidContext.  Also, fix infinite recursion
   in long(Decimal('nan')).