diff options
author | Isis Lovecruft <isis@torproject.org> | 2013-02-15 19:27:53 +0000 |
---|---|---|
committer | Isis Lovecruft <isis@torproject.org> | 2013-02-15 19:27:53 +0000 |
commit | d486c13af17133e2e5a2bfe6e5a862bfea6736ff (patch) | |
tree | 4f68c594a6e3ff072c9c886a076d03d679c2f3c7 /src/leap/mx/util/exceptions.py | |
parent | 02e84d4ac48294bdfea49678d59ebd410010e2a9 (diff) |
Module directory layout changes, with corresponding __init__.py changes.
Diffstat (limited to 'src/leap/mx/util/exceptions.py')
-rw-r--r-- | src/leap/mx/util/exceptions.py | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/leap/mx/util/exceptions.py b/src/leap/mx/util/exceptions.py new file mode 100644 index 0000000..63b946c --- /dev/null +++ b/src/leap/mx/util/exceptions.py @@ -0,0 +1,23 @@ +#! -*- encoding: utf-8 -*- +""" +Custom exceptions for leap_mx. + +@authors: Isis Lovecruft, <isis@leap.se> 0x2cdb8b35 +@version: 0.0.1 +@license: see included LICENSE file +""" + + +class MissingConfig(Exception): + """Raised when the config file cannot be found.""" + def __init__(self, message=None, config_file=None): + if message: + return + else: + self.message = "Cannot locate config file" + if config_file: + self.message += " %s" % config_file + self.message += "." + +class UnsupportedOS(Exception): + """Raised when we're not *nix or *BSD.""" |