From: Matthew Treinish Date: Thu, 29 Nov 2012 22:48:03 +0000 (-0500) Subject: Fix exception when size is None. X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=503e92332db78a2469fcc853a2be1c5dee9c8da4;p=openstack-build%2Fcinder-build.git Fix exception when size is None. If an incoming create request has a size of None raise an exception. Fixes: bug 1084711 Change-Id: I5ad377073cc6853b502889ad9292b5758522ca88 --- diff --git a/cinder/volume/api.py b/cinder/volume/api.py index 3b53a6dcc..36b6ea5bc 100644 --- a/cinder/volume/api.py +++ b/cinder/volume/api.py @@ -103,7 +103,7 @@ class API(base.Base): def as_int(s): try: return int(s) - except ValueError, TypeError: + except (ValueError, TypeError): return s # tolerate size as stringified int