##// END OF EJS Templates
Remove redundant check
Jessica B. Hamrick -
Show More
@@ -34,11 +34,6 b' class FilenameExtension(Unicode):'
34 # cast to proper unicode
34 # cast to proper unicode
35 value = super(FilenameExtension, self).validate(obj, value)
35 value = super(FilenameExtension, self).validate(obj, value)
36
36
37 # make sure the value is actually unicode
38 if not isinstance(value, py3compat.unicode_type):
39 msg = "FileExtension trait '{}' is not of type '{}'"
40 raise TraitError(msg.format(self.name, py3compat.unicode_type))
41
42 # check that it starts with a dot
37 # check that it starts with a dot
43 if not value.startswith('.'):
38 if not value.startswith('.'):
44 msg = "FileExtension trait '{}' does not begin with a dot: {!r}"
39 msg = "FileExtension trait '{}' does not begin with a dot: {!r}"
General Comments 0
You need to be logged in to leave comments. Login now