2.6 compatibility

This commit is contained in:
Nick Coghlan 2013-10-26 22:00:05 +10:00
parent 30515dbe4f
commit f1d447328a

View file

@ -184,7 +184,7 @@ class redirect_stdout:
def __enter__(self):
if self._old_target is not self._sentinel:
raise RuntimeError("Cannot reenter {!r}".format(self))
raise RuntimeError("Cannot reenter {0!r}".format(self))
self._old_target = sys.stdout
sys.stdout = self._new_target
return self._new_target