summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <lars.wirzenius@codethink.co.uk>2014-04-22 15:01:03 +0000
committerLars Wirzenius <lars.wirzenius@codethink.co.uk>2014-04-22 15:01:03 +0000
commit6d6845ff49f04f1152db23c59c863f74a70e08c4 (patch)
tree6dec100c604e0dde62d4fd22e6f7fe8f12806808
parentd50b6551ee8674d354239c4d570dac0204fd6136 (diff)
downloadlorry-controller-6d6845ff49f04f1152db23c59c863f74a70e08c4.tar.gz
Move exception class earlier in file
Suggested-by: Daniel Silverstone
-rw-r--r--lorrycontroller/readconf.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/lorrycontroller/readconf.py b/lorrycontroller/readconf.py
index 9ea8173..d060067 100644
--- a/lorrycontroller/readconf.py
+++ b/lorrycontroller/readconf.py
@@ -279,6 +279,12 @@ class ReadConfiguration(lorrycontroller.LorryControllerRoute):
ignore=json.dumps(section['ignore']))
+class ValidationError(Exception):
+
+ def __init__(self, msg):
+ Exception.__init__(self, msg)
+
+
class LorryControllerConfValidator(object):
def validate_config(self, conf_obj):
@@ -343,9 +349,3 @@ class LorryControllerConfValidator(object):
raise ValidationError(
'mandatory field %s missing in section %r' %
(field, section))
-
-
-class ValidationError(Exception):
-
- def __init__(self, msg):
- Exception.__init__(self, msg)