catch TypeError exception,performing "pass" operation
Bug #1872033 reported by
Qiu Fossen
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
In Progress
|
Undecided
|
Qiu Fossen |
Bug Description
catch TypeError exception,
like this:nova/
def _validate_
regex = parameter_
try:
if re.search(
return True
except TypeError:
# The name must be string type. If instance isn't string type, the
# TypeError will be raised at here.
pass
raise exception.
Changed in nova: | |
assignee: | nobody → Qiu Fossen (fossen123) |
Changed in nova: | |
status: | Incomplete → In Progress |
To post a comment you must log in.
I'm not sure what is the bug you report. The validator only passes if the re.search operation returns true otherwise we raise InvalidName exception. Also if TypeError is raised (and ignored) we raise InvalidName.