Skip to content

Commit c94c579

Browse files
committed
Fixed client crash in case of Client ID reading error
1 parent 3b8db30 commit c94c579

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Changelog
22

33
## [Unreleased]
4+
### Fixed
5+
- Client crash in case of Client ID reading error, by @HardNorth
46

57
## [5.3.2]
68
### Fixed

reportportal_client/services/client_id.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,12 @@ def _store_client_id(client_id):
7979

8080
def get_client_id():
8181
"""Return unique client ID of the instance, generate new if not exists."""
82-
client_id = _read_client_id()
82+
client_id = None
83+
try:
84+
client_id = _read_client_id()
85+
except (PermissionError, IOError) as error:
86+
logger.exception('[%s] Unknown exception has occurred. '
87+
'Skipping client ID reading.', error)
8388
if not client_id:
8489
client_id = str(uuid4())
8590
try:

0 commit comments

Comments
 (0)