Skip to content

Commit 59befba

Browse files
author
Aliaksandr Trush
committed
remove redundant terminate call
error_handler does not return any value. condition "if not self.error_handler" always True the error_handler (pytest_reportportal.service.PyTestServiceClass#async_error_handler) by himself call terminate method inside. so the second terminate call is redundant
1 parent cd0509b commit 59befba

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

reportportal_client/service_async.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,7 @@ def process_item(self, item):
204204
getattr(self.rp_client, method)(**kwargs)
205205
except Exception:
206206
if self.error_handler:
207-
if not self.error_handler(sys.exc_info()):
208-
self.terminate(nowait=True)
207+
self.error_handler(sys.exc_info())
209208
else:
210209
self.terminate(nowait=True)
211210
raise

0 commit comments

Comments
 (0)