mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-07-27 00:09:57 +03:00
Addressing BinaryReader reviews
This commit is contained in:
parent
ad6cc3bfae
commit
66d8a2b95d
|
@ -19,7 +19,7 @@ class BinaryReader:
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, data):
|
def __init__(self, data):
|
||||||
self.stream = data if data else bytes()
|
self.stream = data or b''
|
||||||
self.position = 0
|
self.position = 0
|
||||||
self._last = None # Should come in handy to spot -404 errors
|
self._last = None # Should come in handy to spot -404 errors
|
||||||
|
|
||||||
|
@ -169,8 +169,7 @@ class BinaryReader:
|
||||||
|
|
||||||
def close(self):
|
def close(self):
|
||||||
"""Closes the reader, freeing the BytesIO stream."""
|
"""Closes the reader, freeing the BytesIO stream."""
|
||||||
# self.stream.close()
|
self.stream = b''
|
||||||
pass
|
|
||||||
|
|
||||||
# region Position related
|
# region Position related
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user