summaryrefslogtreecommitdiff
path: root/src/leap/mx/exceptions.py
diff options
context:
space:
mode:
authorIsis Lovecruft <isis@torproject.org>2013-02-17 15:23:54 +0000
committerIsis Lovecruft <isis@torproject.org>2013-02-17 15:23:54 +0000
commit66d60a58ef752f9c9692dd8bdb0f61a5c1dfdb17 (patch)
tree016980342b8e2610f0010efddcab489a8d30db0a /src/leap/mx/exceptions.py
parent364200c25e28d4996024dcf2f0644f5f20cde9ae (diff)
parent8d2fdc800de469420005f9c5deee4c342950ccc9 (diff)
Merge branch 'feature/check-recipient' into develop
Diffstat (limited to 'src/leap/mx/exceptions.py')
-rw-r--r--src/leap/mx/exceptions.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/leap/mx/exceptions.py b/src/leap/mx/exceptions.py
new file mode 100644
index 0000000..63b946c
--- /dev/null
+++ b/src/leap/mx/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."""