From 503e92332db78a2469fcc853a2be1c5dee9c8da4 Mon Sep 17 00:00:00 2001
From: Matthew Treinish <treinish@linux.vnet.ibm.com>
Date: Thu, 29 Nov 2012 17:48:03 -0500
Subject: [PATCH] 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
---
 cinder/volume/api.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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
-- 
2.45.2