summaryrefslogtreecommitdiff
path: root/vymgmt/base_exception/base.py
diff options
context:
space:
mode:
authorhochikong <1097225749@qq.com>2016-08-24 14:41:35 +0800
committerhochikong <1097225749@qq.com>2016-08-24 14:41:35 +0800
commit5c7c56264681faa44b2bca036973b08cecf168ae (patch)
treee8c917d971e8585924515612d068eb672c4d2b9c /vymgmt/base_exception/base.py
parent2528aa7872958c8e4507d8f42ba0fe767989b19b (diff)
downloadpython-vyos-mgmt-5c7c56264681faa44b2bca036973b08cecf168ae.tar.gz
python-vyos-mgmt-5c7c56264681faa44b2bca036973b08cecf168ae.zip
T133 Add a generic method set() and delete()
Fix all problems from now on
Diffstat (limited to 'vymgmt/base_exception/base.py')
-rw-r--r--vymgmt/base_exception/base.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/vymgmt/base_exception/base.py b/vymgmt/base_exception/base.py
new file mode 100644
index 0000000..dc80840
--- /dev/null
+++ b/vymgmt/base_exception/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