Show More
@@ -34,11 +34,11 b' class FilenameExtension(TraitType):' | |||||
34 | try: |
|
34 | try: | |
35 | value = py3compat.cast_bytes_py2(value) |
|
35 | value = py3compat.cast_bytes_py2(value) | |
36 | except UnicodeDecodeError: |
|
36 | except UnicodeDecodeError: | |
37 | msg = "Could not decode {!r} for extension trait '{}'." |
|
37 | msg = "Could not decode {!r} for FileExtension trait '{}'." | |
38 | raise TraitError(msg.format(value, self.name)) |
|
38 | raise TraitError(msg.format(value, self.name)) | |
39 |
|
39 | |||
40 | if not value.startswith('.'): |
|
40 | if not value.startswith('.'): | |
41 | msg = "Extension trait '{}' does not begin with a dot: {!r}" |
|
41 | msg = "FileExtension trait '{}' does not begin with a dot: {!r}" | |
42 | raise TraitError(msg.format(self.name, value)) |
|
42 | raise TraitError(msg.format(self.name, value)) | |
43 |
|
43 | |||
44 | return value |
|
44 | return value |
General Comments 0
You need to be logged in to leave comments.
Login now