Skip to content

Commit

Permalink
Tests: Fix OsError in test_kcm_debug_level_set
Browse files Browse the repository at this point in the history
Resolve "OSError: File '/var/log/sssd/sssd_kcm.log' could not be read"
ba catching and handling this exception as well.

Reviewed-by: Shridhar Gadekar <[email protected]>
  • Loading branch information
jakub-vavra-cz committed Jan 24, 2024
1 parent ef581c9 commit 9985032
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tests/multihost/basic/test_kcm.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def _kcm_log_length(self, multihost):
try:
multihost.master[0].transport.get_file(kcm_log_file,
local_kcm_log_file)
except FileNotFoundError:
except (FileNotFoundError, OSError):
return 0

nlines = sum(1 for line in open(local_kcm_log_file))
Expand Down

0 comments on commit 9985032

Please sign in to comment.