aboutsummaryrefslogtreecommitdiff
path: root/test/functional/test_framework/test_node.py
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2019-09-04 13:17:22 -0400
committerMarcoFalke <falke.marco@gmail.com>2019-09-04 13:10:37 -0400
commitfae91a09c453a9a95c382df765bd71e54698d5b2 (patch)
tree4af9c72fb0a0e7e6cc1aee448771a2212633c2b3 /test/functional/test_framework/test_node.py
parent6e431296daceee604f48e9e3e87fa84cfd44bef2 (diff)
test: Remove incorrect and unused try-block in assert_debug_log
Diffstat (limited to 'test/functional/test_framework/test_node.py')
-rwxr-xr-xtest/functional/test_framework/test_node.py36
1 files changed, 18 insertions, 18 deletions
diff --git a/test/functional/test_framework/test_node.py b/test/functional/test_framework/test_node.py
index 9667cf4ea4..55e6d4caa6 100755
--- a/test/functional/test_framework/test_node.py
+++ b/test/functional/test_framework/test_node.py
@@ -313,24 +313,24 @@ class TestNode():
with open(debug_log, encoding='utf-8') as dl:
dl.seek(0, 2)
prev_size = dl.tell()
- try:
- yield
- finally:
- while True:
- found = True
- with open(debug_log, encoding='utf-8') as dl:
- dl.seek(prev_size)
- log = dl.read()
- print_log = " - " + "\n - ".join(log.splitlines())
- for expected_msg in expected_msgs:
- if re.search(re.escape(expected_msg), log, flags=re.MULTILINE) is None:
- found = False
- if found:
- return
- if time.time() >= time_end:
- break
- time.sleep(0.05)
- self._raise_assertion_error('Expected messages "{}" does not partially match log:\n\n{}\n\n'.format(str(expected_msgs), print_log))
+
+ yield
+
+ while True:
+ found = True
+ with open(debug_log, encoding='utf-8') as dl:
+ dl.seek(prev_size)
+ log = dl.read()
+ print_log = " - " + "\n - ".join(log.splitlines())
+ for expected_msg in expected_msgs:
+ if re.search(re.escape(expected_msg), log, flags=re.MULTILINE) is None:
+ found = False
+ if found:
+ return
+ if time.time() >= time_end:
+ break
+ time.sleep(0.05)
+ self._raise_assertion_error('Expected messages "{}" does not partially match log:\n\n{}\n\n'.format(str(expected_msgs), print_log))
@contextlib.contextmanager
def assert_memory_usage_stable(self, *, increase_allowed=0.03):