Skip to content

Commit fe4dc59

Browse files
author
Dmitriy Gumeniuk
authored
Merge branch 'master' into logging_fix
2 parents 0e12d37 + 03f8f25 commit fe4dc59

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pytest_reportportal/rp_logging.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,5 +149,7 @@ def makeRecord(self, name, level, fn, lno, msg, args, exc_info,
149149
yield
150150

151151
finally:
152-
logger_class._log = original_log
153-
logger_class.makeRecord = original_makeRecord
152+
if hasattr(logger_class, '_patched'):
153+
logger_class._log = original_log
154+
logger_class.makeRecord = original_makeRecord
155+
del logger_class._patched

0 commit comments

Comments
 (0)