Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/tutorius/constraints.py
diff options
context:
space:
mode:
authorVincent Vinet <vince.vinet@gmail.com>2009-10-19 20:15:41 (GMT)
committer Vincent Vinet <vince.vinet@gmail.com>2009-10-19 20:15:41 (GMT)
commit912528253fcf1fc43c1a2d02ffe6e540fe60d8e7 (patch)
tree1d5c075046d260580c9eeb27d0d7d09045a7d4b5 /tutorius/constraints.py
parent6584510d390a37153c20974da6704a907058fea0 (diff)
Merge the TProbe Integration and fix merging induced bugs
Diffstat (limited to 'tutorius/constraints.py')
-rw-r--r--tutorius/constraints.py5
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