Changeset View
Changeset View
Standalone View
Standalone View
swh/model/exceptions.py
Show First 20 Lines • Show All 123 Lines • ▼ Show 20 Lines | class ValidationError(Exception): | ||||
def __str__(self): | def __str__(self): | ||||
if hasattr(self, "error_dict"): | if hasattr(self, "error_dict"): | ||||
return repr(dict(self)) | return repr(dict(self)) | ||||
return repr(list(self)) | return repr(list(self)) | ||||
def __repr__(self): | def __repr__(self): | ||||
return "ValidationError(%s)" % self | return "ValidationError(%s)" % self | ||||
marmoute: This exception need a docstring. And if I understand it Correctly, it should subclass… | |||||
Done Inline ActionsThe exception has been copy pasted from swh.scanner like extract_regex_objs. I don't think changing it as it is just about moving code from one package to another. acezar: The exception has been copy pasted from `swh.scanner` like `extract_regex_objs`. I don't think… | |||||
class InvalidDirectoryPath(Exception): | |||||
pass |
This exception need a docstring. And if I understand it Correctly, it should subclass RuntimeError.