summaryrefslogtreecommitdiff
path: root/pokemontools/configuration.py
diff options
context:
space:
mode:
authorBryan Bishop <kanzure@gmail.com>2013-11-18 22:26:54 -0800
committerBryan Bishop <kanzure@gmail.com>2013-11-18 22:26:54 -0800
commit46782bf6dc938ab8ad4f8c65c2df924fd7e1d6a7 (patch)
treedebf7e6e493961900ae9d16df9eedaee6176ba3d /pokemontools/configuration.py
parente673a9f7b25853b38e78799086d484352c8320f4 (diff)
parent185a29698e5d3175cecbd779103e1a9838ff0ecc (diff)
Merge pull request #56 from kanzure/map-editor-stuff
Remove globals from the map editor
Diffstat (limited to 'pokemontools/configuration.py')
-rw-r--r--pokemontools/configuration.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/pokemontools/configuration.py b/pokemontools/configuration.py
index cbf230c..1592fe6 100644
--- a/pokemontools/configuration.py
+++ b/pokemontools/configuration.py
@@ -4,7 +4,10 @@ Configuration
import os
-import exceptions
+class ConfigException(Exception):
+ """
+ Configuration error. Maybe a missing config variable.
+ """
class Config(object):
"""
@@ -23,7 +26,7 @@ class Config(object):
if key not in self.__dict__:
self._config[key] = value
else:
- raise exceptions.ConfigException(
+ raise ConfigException(
"Can't store \"{0}\" in configuration because the key conflicts with an existing property."
.format(key)
)
@@ -49,6 +52,6 @@ class Config(object):
elif key in self._config:
return self._config[key]
else:
- raise exceptions.ConfigException(
+ raise ConfigException(
"no config found for \"{0}\"".format(key)
)