]> granicus.if.org Git - python/commitdiff
Merged revisions 74773 via svnmerge from
authorMatthias Klose <doko@ubuntu.com>
Sun, 13 Sep 2009 15:18:53 +0000 (15:18 +0000)
committerMatthias Klose <doko@ubuntu.com>
Sun, 13 Sep 2009 15:18:53 +0000 (15:18 +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 d1a869a24992306bf54b90cdfb7614e72ec8362e..4eb86a8c8d994d7d8a26052d1e1b5b4b4b52fe8d 100755 (executable)
@@ -598,9 +598,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 e1733e0fe8f06319b320dcd16fc4dcef5ec480b6..a90dbaa85ec43759d9b15c2277c86e1d2fab5051 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -70,6 +70,8 @@ C-API
 Library
 -------
 
+- Issue #6635: Fix profiler printing usage message.
+
 - Issue #6856: Add a filter keyword argument to TarFile.add().
 
 - Issue #6888: pdb's alias command was broken when no arguments were given.