mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-18 05:12:45 +01:00
pyln: Do not rstrip() the return value of .append()
This was causing the following error ``` Exception in thread Thread-553: Traceback (most recent call last): File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner self.run() File "/usr/lib/python3.6/threading.py", line 864, in run self._target(*self._args, **self._kwargs) File "/tmp/cirrus-ci-build/contrib/pyln-testing/pyln/testing/utils.py", line 232, in tail self.err_logs.append(line.rstrip().decode('UTF-8', 'replace')).rstrip() AttributeError: 'NoneType' object has no attribute 'rstrip' [gw5] [ 33%] FAILED tests/test_misc.py::test_bitcoin_failure ``` Notice the second call to `.rstrip()` on the return value of `.append()`
This commit is contained in:
parent
b3fd47e5f6
commit
dbb83a1bc3
@ -227,9 +227,13 @@ class TailableProc(object):
|
||||
|
||||
if self.proc.stderr:
|
||||
for line in iter(self.proc.stderr.readline, ''):
|
||||
|
||||
if line is None or len(line) == 0:
|
||||
break
|
||||
self.err_logs.append(line.rstrip().decode('UTF-8', 'replace')).rstrip()
|
||||
|
||||
line = line.rstrip().decode('UTF-8', 'replace')
|
||||
self.err_logs.append(line)
|
||||
|
||||
self.proc.stderr.close()
|
||||
|
||||
def is_in_log(self, regex, start=0):
|
||||
|
Loading…
Reference in New Issue
Block a user