diff options
| author | Bryan Bishop <kanzure@gmail.com> | 2013-11-17 18:34:57 -0600 | 
|---|---|---|
| committer | Bryan Bishop <kanzure@gmail.com> | 2013-11-17 18:34:57 -0600 | 
| commit | 8ebf9b05b5ed53cd8f635dd86dbfea8bf736fd10 (patch) | |
| tree | 846400ea2a5d1dfc3ddb16763a54fca0070cebb3 | |
| parent | 76d47a68b345695d676879c723c0a833bf2c4396 (diff) | |
make ConfigException accessible
Apparently the "exceptions" name is already used for another module.
| -rw-r--r-- | pokemontools/configuration.py | 9 | ||||
| -rw-r--r-- | pokemontools/exceptions.py | 5 | 
2 files changed, 6 insertions, 8 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)              ) diff --git a/pokemontools/exceptions.py b/pokemontools/exceptions.py index 4de62eb..e583b17 100644 --- a/pokemontools/exceptions.py +++ b/pokemontools/exceptions.py @@ -12,11 +12,6 @@ class TextScriptException(Exception):      TextScript encountered an inconsistency or problem.      """ -class ConfigException(Exception): -    """ -    Configuration error. Maybe a missing config variable. -    """ -  class PreprocessorException(Exception):      """      There was a problem in the preprocessor. | 
