@@ -97,9 +97,9 @@ def stop(self, nowait=False):
97
97
This asks the thread to terminate, and then waits for it to do so.
98
98
Note that if you don't call this before your application exits, there
99
99
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
101
101
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
103
103
contains items.
104
104
"""
105
105
self ._stop .set ()
@@ -113,7 +113,7 @@ def stop(self, nowait=False):
113
113
114
114
115
115
class ReportPortalServiceAsync (object ):
116
- """Wrapper around service class to transparently provide async operations
116
+ """Wrapper around service class to transparently provide async operations
117
117
to agents."""
118
118
119
119
BATCH_SIZE = 20
@@ -127,12 +127,13 @@ def __init__(self, endpoint, project, token, api_base="api/v1",
127
127
project: project name to use for launch names.
128
128
token: authorization token.
129
129
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)
132
132
"""
133
133
super (ReportPortalServiceAsync , self ).__init__ ()
134
134
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 )
136
137
self .log_batch = []
137
138
self .supported_methods = ["start_launch" , "finish_launch" ,
138
139
"start_test_item" , "finish_test_item" , "log" ]
@@ -157,7 +158,7 @@ def terminate(self, nowait=False):
157
158
try :
158
159
if not nowait :
159
160
self ._post_log_batch ()
160
- except Exception as err :
161
+ except Exception :
161
162
if self .error_handler :
162
163
self .error_handler (sys .exc_info ())
163
164
else :
@@ -201,7 +202,7 @@ def process_item(self, item):
201
202
else :
202
203
self ._post_log_batch ()
203
204
getattr (self .rp_client , method )(** kwargs )
204
- except Exception as err :
205
+ except Exception :
205
206
if self .error_handler :
206
207
if not self .error_handler (sys .exc_info ()):
207
208
self .terminate (nowait = True )
0 commit comments