diff mercurial/util.py @ 13128:dbc546811dd6 stable

util: work around behavior change in Python 2.7.1
author Steve Borho <steve@borho.org>
date Mon, 13 Dec 2010 11:51:01 -0600
parents adff480db558
children 873c032c81b5 6c9345f9edca
line wrap: on
line diff
--- a/mercurial/util.py	Mon Dec 13 11:52:21 2010 +0100
+++ b/mercurial/util.py	Mon Dec 13 11:51:01 2010 -0600
@@ -391,7 +391,8 @@
             return '1'
         return str(val)
     origcmd = cmd
-    if os.name == 'nt':
+    if os.name == 'nt' and sys.version_info < (2, 7, 1):
+        # Python versions since 2.7.1 do this extra quoting themselves
         cmd = '"%s"' % cmd
     env = dict(os.environ)
     env.update((k, py2shell(v)) for k, v in environ.iteritems())