forked from LBRYCommunity/lbry-sdk
BCDataStream can now also take file pointer as argument
This commit is contained in:
parent
bad4320ddf
commit
2ee13ce39f
1 changed files with 2 additions and 2 deletions
|
@ -4,8 +4,8 @@ from io import BytesIO
|
|||
|
||||
class BCDataStream:
|
||||
|
||||
def __init__(self, data=None):
|
||||
self.data = BytesIO(data)
|
||||
def __init__(self, data=None, fp=None):
|
||||
self.data = fp or BytesIO(data)
|
||||
|
||||
def reset(self):
|
||||
self.data.seek(0)
|
||||
|
|
Loading…
Reference in a new issue