summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Vandenberg <jayvdb@gmail.com>2015-10-20 18:52:35 +1100
committerJohn Vandenberg <jayvdb@gmail.com>2015-10-20 18:52:35 +1100
commit4ea5d2fd496bb4778a41369512e3f64b717d6f02 (patch)
treedb037e17f07223e4ea04860977c75e485a9224eb
parent164ebca3cea04ef68e6f5c55573ca86c4f257ffa (diff)
downloadcherrypy-4ea5d2fd496bb4778a41369512e3f64b717d6f02.tar.gz
Python 2.6 str.format does not support unindexed parameters
The code using Python 2.7+ only code was used on Windows only.
-rw-r--r--cherrypy/_cpcompat_subprocess.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/cherrypy/_cpcompat_subprocess.py b/cherrypy/_cpcompat_subprocess.py
index ce363725..517b8d44 100644
--- a/cherrypy/_cpcompat_subprocess.py
+++ b/cherrypy/_cpcompat_subprocess.py
@@ -883,7 +883,7 @@ class Popen(object):
startupinfo.dwFlags |= _subprocess.STARTF_USESHOWWINDOW
startupinfo.wShowWindow = _subprocess.SW_HIDE
comspec = os.environ.get("COMSPEC", "cmd.exe")
- args = '{} /c "{}"'.format(comspec, args)
+ args = '{0} /c "{1}"'.format(comspec, args)
if (_subprocess.GetVersion() >= 0x80000000 or
os.path.basename(comspec).lower() == "command.com"):
# Win9x, or using command.com on NT. We need to
@@ -1029,7 +1029,7 @@ class Popen(object):
elif sig == signal.CTRL_BREAK_EVENT:
os.kill(self.pid, signal.CTRL_BREAK_EVENT)
else:
- raise ValueError("Unsupported signal: {}".format(sig))
+ raise ValueError("Unsupported signal: {0}".format(sig))
def terminate(self):
"""Terminates the process