Use simpler super()

This commit is contained in:
Nikita Karamov 2023-01-23 06:51:50 +01:00
parent de3d930421
commit 783632fb24
No known key found for this signature in database
GPG key ID: 41D6F71EE78E77CD

View file

@ -2580,9 +2580,9 @@ class CommandLineUsage(unittest.TestCase):
class InOutBuffer(six.StringIO):
def write(self, string):
try:
return super(InOutBuffer, self).write(string)
return super().write(string)
except TypeError:
return super(InOutBuffer, self).write(string.decode())
return super().write(string.decode())
sys.stdin = self.temp_stdin = InOutBuffer()
sys.stdout = self.temp_stdout = InOutBuffer()