lightning: fix newline count
This commit is contained in:
parent
ac52c40857
commit
5a9a624857
@ -748,8 +748,8 @@ class LightningWorker(ForeverCoroutineJob):
|
|||||||
async def readJson(reader, is_running):
|
async def readJson(reader, is_running):
|
||||||
data = b""
|
data = b""
|
||||||
while is_running():
|
while is_running():
|
||||||
newlines = sum(1 if x == b"\n" else 0 for x in data)
|
newlines = sum(1 if x == b"\n"[0] else 0 for x in data)
|
||||||
if newlines > 1: print("Too many newlines 3!", data)
|
if newlines > 1: print("Too many newlines in Electrum/lightning.py!", data)
|
||||||
try:
|
try:
|
||||||
return json.loads(data)
|
return json.loads(data)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user