Skip to content

Commit

Permalink
handle empty tiles.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
bbilly1 committed Jun 29, 2022
1 parent e103b4e commit 515927f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions tilefy/src/config_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ def load_yml(self):
"""load yml into redis"""
if not self.exists:
print("missing tiles.yml")
TilefyRedis().del_message("config")
return

self.get_conf()
Expand Down
3 changes: 3 additions & 0 deletions tilefy/src/watcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ def __init__(self):

def watch(self):
"""watch for changes, call from schedule"""
if not os.path.exists(self.FILE_PATH):
return

modified = self.is_changed()
if modified:
print(f"{self.FILE_PATH}: modified")
Expand Down

0 comments on commit 515927f

Please sign in to comment.