Skip to content

Commit

Permalink
error on non existing custom file
Browse files Browse the repository at this point in the history
instead of exception in logs
  • Loading branch information
gsemet committed Sep 21, 2018
1 parent 6c0974d commit ebf97fa
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions guake/customcommands.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ def get_file_path(self):
return os.path.expanduser(self.settings.general.get_string('custom-command-file'))

def _load_json(self, file_name):
if not os.path.exists(file_name):
log.error("Custom file does not exit: %s", file_name)
return None
try:
with open(file_name) as f:
data_file = f.read()
Expand Down

0 comments on commit ebf97fa

Please sign in to comment.