Skip to content

Commit

Permalink
fix: Adds config file checks
Browse files Browse the repository at this point in the history
  • Loading branch information
ntlhui committed Dec 14, 2024
1 parent 8981ded commit c74ff90
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions label_studio_slack_reporter/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ def __init__(self,
self.stop_event = Event()
self.__debug = debug

if not config.is_file():
raise ValueError('Config path is not a file!')

with open(config, 'r', encoding='utf-8') as handle:
self.__config = parse(handle.read())

Expand Down

0 comments on commit c74ff90

Please sign in to comment.