Skip to content

Commit

Permalink
Allow DEFAULT section to be absent
Browse files Browse the repository at this point in the history
  • Loading branch information
chr-1x committed Mar 12, 2018
1 parent 93c40fc commit 5c8a191
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ananas/ananas.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,8 @@ def load(self, name=None):
self._bot.log("config", "Section {} not in {}, aborting.".format(self._name, self._filename))
return False
self._bot.log("config", "Loading configuration from {}".format(self._filename))
self.update(self._cfg["DEFAULT"])
if "DEFAULT" in self._cfg.sections:
self.update(self._cfg["DEFAULT"])
self.update(self._cfg[self._name])
return True

Expand Down

0 comments on commit 5c8a191

Please sign in to comment.