aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'master/autotua/process/validate.py')
-rw-r--r--master/autotua/process/validate.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/master/autotua/process/validate.py b/master/autotua/process/validate.py
index 9a84537..dcbc201 100644
--- a/master/autotua/process/validate.py
+++ b/master/autotua/process/validate.py
@@ -7,29 +7,28 @@
#
from datetime import datetime
-from django.core.validators import ValidationError
import const
def is_stage(stage):
if stage not in const.STAGES:
- raise ValidationError(const.VERRORS['invalid_stage'] % stage)
+ raise Exception(const.VERRORS['invalid_stage'] % stage)
return True
def is_arch(arch):
if arch not in const.ARCHS['all']:
- raise ValidationError(const.VERRORS['invalid_arch'] % i)
+ raise Exception(const.VERRORS['invalid_arch'] % i)
return True
def is_type(type):
if type not in const.STAGE_TYPE:
- raise ValidationError(const.VERRORS['invalid_type'] % type)
+ raise Exception(const.VERRORS['invalid_type'] % type)
return True
def is_release(release):
year, state = release.split('_', 1)
try:
if int(year.split('.', 1)[0]) > datetime.now().year:
- raise ValidationError(const.VERRORS['invalid_release'] % release)
+ raise Exception(const.VERRORS['invalid_release'] % release)
except:
- raise ValidationError(const.VERRORS['invalid_release'] % release)
+ raise Exception(const.VERRORS['invalid_release'] % release)
return True