From 2ee13ce39f2f0b83dab9f76f1c72a72f5f16edc4 Mon Sep 17 00:00:00 2001 From: Lex Berezhny Date: Fri, 14 Feb 2020 11:34:26 -0500 Subject: [PATCH] BCDataStream can now also take file pointer as argument --- lbry/wallet/bcd_data_stream.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lbry/wallet/bcd_data_stream.py b/lbry/wallet/bcd_data_stream.py index 1c04be005..9314f3d46 100644 --- a/lbry/wallet/bcd_data_stream.py +++ b/lbry/wallet/bcd_data_stream.py @@ -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)