Commit b07769d8 authored by Laurent Peuch's avatar Laurent Peuch
Browse files

refactor(__init__): remove python2 specific code

parent 0b794396bec6
Pipeline #41380 passed with stages
in 33 minutes and 42 seconds
...@@ -67,8 +67,7 @@ class Binary(BytesIO): ...@@ -67,8 +67,7 @@ class Binary(BytesIO):
def __init__(self, buf=b''): def __init__(self, buf=b''):
assert isinstance(buf, self._allowed_types), \ assert isinstance(buf, self._allowed_types), \
"Binary objects must use bytes/buffer objects, not %s" % buf.__class__ "Binary objects must use bytes/buffer objects, not %s" % buf.__class__
# don't call super, BytesIO may be an old-style class (on python < 2.7.4) super().__init__(buf)
BytesIO.__init__(self, buf)
def write(self, data): def write(self, data):
assert isinstance(data, self._allowed_types), \ assert isinstance(data, self._allowed_types), \
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment