Skip to content
This repository has been archived by the owner on Sep 3, 2023. It is now read-only.

Commit

Permalink
config: raise KeyError if default value is not found
Browse files Browse the repository at this point in the history
  • Loading branch information
ericswpark committed May 21, 2021
1 parent 4357c98 commit b12f9fd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion shippy/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ def get_config_value(section, key):
except KeyError:
# Set defaults and return
value = get_default(section, key)
set_config_value(section, key, value)
if value:
set_config_value(section, key, value)
else:
raise KeyError

return value

Expand Down

0 comments on commit b12f9fd

Please sign in to comment.