diff options
author | Charlie <charlie@tutorius-dev.(none)> | 2009-10-25 01:18:10 (GMT) |
---|---|---|
committer | Charlie <charlie@tutorius-dev.(none)> | 2009-10-25 01:18:10 (GMT) |
commit | 48ba2db44bb2054222cad3aca3e027e24c51c090 (patch) | |
tree | 13a25552db428a3a97e22e09f7936c4a988f11cf /tutorius/constraints.py | |
parent | 2b4eaea8f46e846799595b3c7015f77c6156532b (diff) | |
parent | aa4868af13437f4718e8ce7972b79b496d296068 (diff) |
Merge branch 'demo' into activity
Diffstat (limited to 'tutorius/constraints.py')
-rw-r--r-- | tutorius/constraints.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tutorius/constraints.py b/tutorius/constraints.py index 36abdfb..e91f23a 100644 --- a/tutorius/constraints.py +++ b/tutorius/constraints.py @@ -200,7 +200,10 @@ class FileConstraint(Constraint): def validate(self, value): # TODO : Decide on the architecture for file retrieval on disk # Relative paths? From where? Support macros? - # + # FIXME This is a hack to make cases where a default file is not valid + # work. It allows None values to be validated, though + if value is None: + return if not os.path.isfile(value): raise FileConstraintError("Non-existing file : %s"%value) return |