Skip to content

Commit

Permalink
Catch OSError when reading pollfile
Browse files Browse the repository at this point in the history
This should rarely/never happen, since we check for the existence of the pollfile
when loading the config and earlier in the same function, but better safe than sorry
  • Loading branch information
johannaengland committed Jul 26, 2024
1 parent 0791b1e commit 06ada60
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/zino/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def load_polldevs(polldevs_conf: str, last_run_time: Optional[datetime] = None)

try:
devices = {d.name: d for d in read_polldevs(polldevs_conf)}
except InvalidConfiguration as error:
except (InvalidConfiguration, OSError) as error:
_log.error(error)
return set(), set()

Expand Down

0 comments on commit 06ada60

Please sign in to comment.