File tree Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Original file line number Diff line number Diff line change 2
2
3
3
## [ Unreleased]
4
4
### Added
5
+ - Check for parent ` RPClient ` object in thread before logging, by @HardNorth
6
+
7
+ ## [ 5.3.3]
8
+ ### Added
5
9
- ` RPClient.clone() ` method, by @HardNorth
6
10
### Fixed
7
11
- Client crash in case of Client ID reading error, by @HardNorth
Original file line number Diff line number Diff line change 14
14
15
15
import logging
16
16
import sys
17
+ import threading
17
18
18
19
from six import PY2
19
20
from six .moves .urllib .parse import urlparse
20
21
21
22
# noinspection PyProtectedMember
22
- from reportportal_client ._local import current
23
+ from reportportal_client ._local import current , set_current
23
24
from reportportal_client .helpers import timestamp
24
25
25
26
@@ -177,6 +178,11 @@ def emit(self, record):
177
178
rp_client = self .rp_client
178
179
if not rp_client :
179
180
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 )
180
186
if rp_client :
181
187
rp_client .log (
182
188
timestamp (),
Original file line number Diff line number Diff line change 4
4
5
5
from setuptools import setup , find_packages
6
6
7
- __version__ = '5.3.3 '
7
+ __version__ = '5.3.4 '
8
8
9
9
TYPE_STUBS = ['*.pyi' ]
10
10
You can’t perform that action at this time.
0 commit comments