Use simpler super()
This commit is contained in:
parent
de3d930421
commit
783632fb24
1 changed files with 2 additions and 2 deletions
|
|
@ -2580,9 +2580,9 @@ class CommandLineUsage(unittest.TestCase):
|
||||||
class InOutBuffer(six.StringIO):
|
class InOutBuffer(six.StringIO):
|
||||||
def write(self, string):
|
def write(self, string):
|
||||||
try:
|
try:
|
||||||
return super(InOutBuffer, self).write(string)
|
return super().write(string)
|
||||||
except TypeError:
|
except TypeError:
|
||||||
return super(InOutBuffer, self).write(string.decode())
|
return super().write(string.decode())
|
||||||
|
|
||||||
sys.stdin = self.temp_stdin = InOutBuffer()
|
sys.stdin = self.temp_stdin = InOutBuffer()
|
||||||
sys.stdout = self.temp_stdout = InOutBuffer()
|
sys.stdout = self.temp_stdout = InOutBuffer()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue