Skip to content

Commit 8b3599a

Browse files
committed
Remove stack_info param to avoid python 2.7 errors
1 parent 9d16f41 commit 8b3599a

File tree

2 files changed

+17
-32
lines changed

2 files changed

+17
-32
lines changed

reportportal_client/core/rp_requests.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,7 @@ def make(self):
8787
"Report Portal %s request failed after %d attempts",
8888
self.name,
8989
SEND_RETRY_COUNT,
90-
exc_info=exceptions[-1],
91-
stack_info=True
90+
exc_info=exceptions[-1]
9291
)
9392

9493

reportportal_client/service.py

Lines changed: 16 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ def start_launch(self,
237237
timeout=self.http_timeout)
238238
except (ValueError, KeyError, IOError) as exc:
239239
logger.warning("Report Portal Start Launch request failed",
240-
exc_info=exc, stack_info=True)
240+
exc_info=exc)
241241
return
242242
self.launch_id = _get_id(r)
243243
logger.debug("start_launch - ID: %s", self.launch_id)
@@ -265,10 +265,8 @@ def finish_launch(self, end_time, status=None, attributes=None, **kwargs):
265265
r = self.session.put(url, json=data, verify=self.verify_ssl,
266266
timeout=self.http_timeout)
267267
except (ValueError, KeyError, IOError) as exc:
268-
logger.warning(
269-
"Report Portal Finish Launch request failed",
270-
exc_info=exc, stack_info=True
271-
)
268+
logger.warning("Report Portal Finish Launch request failed",
269+
exc_info=exc)
272270
return
273271
logger.debug("finish_launch - ID: %s", self.launch_id)
274272
return _get_msg(r)
@@ -292,10 +290,8 @@ def get_launch_info(self, max_retries=5):
292290
resp = self.session.get(url, verify=self.verify_ssl,
293291
timeout=self.http_timeout)
294292
except (ValueError, KeyError, IOError) as exc:
295-
logger.warning(
296-
"Report Portal Launch Info request failed",
297-
exc_info=exc, stack_info=True
298-
)
293+
logger.warning("Report Portal Launch Info request failed",
294+
exc_info=exc)
299295
continue
300296

301297
if resp.status_code == 200:
@@ -385,10 +381,8 @@ def start_test_item(self,
385381
r = self.session.post(url, json=data, verify=self.verify_ssl,
386382
timeout=self.http_timeout)
387383
except (ValueError, KeyError, IOError) as exc:
388-
logger.warning(
389-
"Report Portal Start Item request failed",
390-
exc_info=exc, stack_info=True
391-
)
384+
logger.warning("Report Portal Start Item request failed",
385+
exc_info=exc)
392386
return
393387

394388
item_id = _get_id(r)
@@ -413,10 +407,8 @@ def update_test_item(self, item_uuid, attributes=None, description=None):
413407
r = self.session.put(url, json=data, verify=self.verify_ssl,
414408
timeout=self.http_timeout)
415409
except (ValueError, KeyError, IOError) as exc:
416-
logger.warning(
417-
"Report Portal Update Item request failed",
418-
exc_info=exc, stack_info=True
419-
)
410+
logger.warning("Report Portal Update Item request failed",
411+
exc_info=exc)
420412
return
421413
logger.debug("update_test_item - Item: %s", item_id)
422414
return _get_msg(r)
@@ -457,10 +449,8 @@ def finish_test_item(self,
457449
try:
458450
r = self.session.put(url, json=data, verify=self.verify_ssl)
459451
except (ValueError, KeyError, IOError) as exc:
460-
logger.warning(
461-
"Report Portal Finish Item request failed",
462-
exc_info=exc, stack_info=True
463-
)
452+
logger.warning("Report Portal Finish Item request failed",
453+
exc_info=exc)
464454
return
465455
logger.debug("finish_test_item - ID: %s", item_id)
466456
return _get_msg(r)
@@ -476,10 +466,8 @@ def get_item_id_by_uuid(self, uuid):
476466
r = self.session.get(url, verify=self.verify_ssl,
477467
timeout=self.http_timeout)
478468
except (ValueError, KeyError, IOError) as exc:
479-
logger.warning(
480-
"Report Portal Item Details request failed",
481-
exc_info=exc, stack_info=True
482-
)
469+
logger.warning("Report Portal Item Details request failed",
470+
exc_info=exc)
483471
return
484472
return _get_json(r)["id"]
485473

@@ -494,10 +482,8 @@ def get_project_settings(self):
494482
r = self.session.get(url, json={}, verify=self.verify_ssl,
495483
timeout=self.http_timeout)
496484
except (ValueError, KeyError, IOError) as exc:
497-
logger.warning(
498-
"Report Portal Project Settings request failed",
499-
exc_info=exc, stack_info=True
500-
)
485+
logger.warning("Report Portal Project Settings request failed",
486+
exc_info=exc)
501487
return
502488
logger.debug("settings")
503489
return _get_json(r)
@@ -586,5 +572,5 @@ def _log_batch(self, log_data, force=False):
586572
logger.warning(
587573
"Report Portal Batch Log request failed after %d attempts",
588574
POST_LOGBATCH_RETRY_COUNT,
589-
exc_info=exceptions[-1], stack_info=True
575+
exc_info=exceptions[-1]
590576
)

0 commit comments

Comments
 (0)