[Python-checkins] r74773 - in python/trunk: Lib/profile.py Misc/NEWS

matthias.klose python-checkins at python.org
Sun Sep 13 17:09:24 CEST 2009


Author: matthias.klose
Date: Sun Sep 13 17:09:24 2009
New Revision: 74773

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


Modified:
   python/trunk/Lib/profile.py
   python/trunk/Misc/NEWS

Modified: python/trunk/Lib/profile.py
==============================================================================
--- python/trunk/Lib/profile.py	(original)
+++ python/trunk/Lib/profile.py	Sun Sep 13 17:09:24 2009
@@ -605,9 +605,9 @@
         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:

Modified: python/trunk/Misc/NEWS
==============================================================================
--- python/trunk/Misc/NEWS	(original)
+++ python/trunk/Misc/NEWS	Sun Sep 13 17:09:24 2009
@@ -366,6 +366,8 @@
 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


More information about the Python-checkins mailing list