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

................
  r74775 | matthias.klose | 2009-09-13 17:18:53 +0200 (So, 13 Sep 2009) | 9 lines

  Merged revisions 74773 via svnmerge from
  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 cdc247911bccbc476c08a28ac27db47fbb579142..d969246475ba6737b84323023580fcd9260abe11 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]))
         fp = open(sys.argv[0])
         try:
index 2f04edb773d2b443f66759bf7e7e028a2148c4d3..ed0692a8fb91f35d08b0225e0b7911211f17f2fd 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -21,6 +21,8 @@ Core and Builtins
 Library
 -------
 
+- Issue #6635: Fix profiler printing usage message.
+
 - Issue #6888: pdb's alias command was broken when no arguments were given.
 
 - Issue #6795: int(Decimal('nan')) now raises ValueError instead of