summaryrefslogtreecommitdiff
path: root/vymgmt/base_exceptions/base.py
diff options
context:
space:
mode:
authorhochikong <1097225749@qq.com>2016-08-24 14:56:00 +0800
committerhochikong <1097225749@qq.com>2016-08-24 14:56:00 +0800
commita9d1a18af94f3e0f0ac669c51f3acfb1c03058f0 (patch)
tree06bac4c77b31280bce803ad48a8efcaa8f8b2728 /vymgmt/base_exceptions/base.py
parentaa8082393f42d5b10b910dfacdc5f57f59e7175f (diff)
downloadpython-vyos-mgmt-a9d1a18af94f3e0f0ac669c51f3acfb1c03058f0.tar.gz
python-vyos-mgmt-a9d1a18af94f3e0f0ac669c51f3acfb1c03058f0.zip
Fix some mistakes in README and check all codes by 2to3
Diffstat (limited to 'vymgmt/base_exceptions/base.py')
-rw-r--r--vymgmt/base_exceptions/base.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/vymgmt/base_exceptions/base.py b/vymgmt/base_exceptions/base.py
new file mode 100644
index 0000000..dc80840
--- /dev/null
+++ b/vymgmt/base_exceptions/base.py
@@ -0,0 +1,15 @@
+# Copyright (c) 2016 Hochikong
+
+prefix = "\r\n"
+
+
+class Error(Exception):
+ pass
+
+
+class CommonError(Error):
+ def __init__(self, message):
+ self.error_message = message
+
+ def __str__(self):
+ return prefix + self.error_message