]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Catch additional type conversion errors
authorJamie Lennox <jamielennox@redhat.com>
Tue, 5 May 2015 01:50:21 +0000 (11:50 +1000)
committerJamie Lennox <jamielennox@redhat.com>
Tue, 5 May 2015 02:13:13 +0000 (12:13 +1000)
commitf3630dd130d6e2e90b84416c9084e515604718ed
tree88c6341713eb10941f1327da6e5ded1a052f3162
parent39478338bb4a1cbd625a6176d4403bb34a2a0630
Catch additional type conversion errors

When converting strings to integers in quota we catch ValueError which
will handle an input which is not a valid number, eg 'abc'. Extend this
to covert TypeErrors which will handle things like a None value being
passed.

Partial-Bug: #1451637
Change-Id: I7e3e694d539113beeb99001aeb80012ac4c1124d
cinder/api/contrib/quotas.py
cinder/tests/unit/api/contrib/test_quotas.py