Skip to content

Commit dc6a4d7

Browse files
committed
fix flake8 warnings
1 parent 985d350 commit dc6a4d7

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

reportportal_client/service_async.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,9 @@ def stop(self, nowait=False):
9797
This asks the thread to terminate, and then waits for it to do so.
9898
Note that if you don't call this before your application exits, there
9999
may be some records still left on the queue, which won't be processed.
100-
If nowait is False then thread will handle remaining items in queue and
100+
If nowait is False then thread will handle remaining items in queue and
101101
stop.
102-
If nowait is True then thread will be stopped even if the queue still
102+
If nowait is True then thread will be stopped even if the queue still
103103
contains items.
104104
"""
105105
self._stop.set()
@@ -113,7 +113,7 @@ def stop(self, nowait=False):
113113

114114

115115
class ReportPortalServiceAsync(object):
116-
"""Wrapper around service class to transparently provide async operations
116+
"""Wrapper around service class to transparently provide async operations
117117
to agents."""
118118

119119
BATCH_SIZE = 20
@@ -127,12 +127,13 @@ def __init__(self, endpoint, project, token, api_base="api/v1",
127127
project: project name to use for launch names.
128128
token: authorization token.
129129
api_base: defaults to api/v1, can be changed to other version.
130-
error_handler: function to be called to handle errors occured during
131-
items processing (in thread)
130+
error_handler: function to be called to handle errors occurred
131+
during items processing (in thread)
132132
"""
133133
super(ReportPortalServiceAsync, self).__init__()
134134
self.error_handler = error_handler
135-
self.rp_client = ReportPortalService(endpoint, project, token, api_base)
135+
self.rp_client = ReportPortalService(
136+
endpoint, project, token, api_base)
136137
self.log_batch = []
137138
self.supported_methods = ["start_launch", "finish_launch",
138139
"start_test_item", "finish_test_item", "log"]
@@ -157,7 +158,7 @@ def terminate(self, nowait=False):
157158
try:
158159
if not nowait:
159160
self._post_log_batch()
160-
except Exception as err:
161+
except Exception:
161162
if self.error_handler:
162163
self.error_handler(sys.exc_info())
163164
else:
@@ -201,7 +202,7 @@ def process_item(self, item):
201202
else:
202203
self._post_log_batch()
203204
getattr(self.rp_client, method)(**kwargs)
204-
except Exception as err:
205+
except Exception:
205206
if self.error_handler:
206207
if not self.error_handler(sys.exc_info()):
207208
self.terminate(nowait=True)

0 commit comments

Comments
 (0)