File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33## [ Unreleased]
44### Added
5+ - Check for parent ` RPClient ` object in thread before logging, by @HardNorth
6+
7+ ## [ 5.3.3]
8+ ### Added
59- ` RPClient.clone() ` method, by @HardNorth
610### Fixed
711- Client crash in case of Client ID reading error, by @HardNorth
Original file line number Diff line number Diff line change 1414
1515import logging
1616import sys
17+ import threading
1718
1819from six import PY2
1920from six .moves .urllib .parse import urlparse
2021
2122# noinspection PyProtectedMember
22- from reportportal_client ._local import current
23+ from reportportal_client ._local import current , set_current
2324from reportportal_client .helpers import timestamp
2425
2526
@@ -177,6 +178,11 @@ def emit(self, record):
177178 rp_client = self .rp_client
178179 if not rp_client :
179180 rp_client = current ()
181+ if not rp_client :
182+ rp_client = getattr (threading .current_thread (),
183+ 'parent_rp_client' , None )
184+ if rp_client :
185+ set_current (rp_client )
180186 if rp_client :
181187 rp_client .log (
182188 timestamp (),
Original file line number Diff line number Diff line change 44
55from setuptools import setup , find_packages
66
7- __version__ = '5.3.3 '
7+ __version__ = '5.3.4 '
88
99TYPE_STUBS = ['*.pyi' ]
1010
You can’t perform that action at this time.
0 commit comments