summaryrefslogtreecommitdiffstats
path: root/nova/api
diff options
context:
space:
mode:
Diffstat (limited to 'nova/api')
-rw-r--r--nova/api/ec2/apirequest.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/nova/api/ec2/apirequest.py b/nova/api/ec2/apirequest.py
index 4b3b93124..3c8651582 100644
--- a/nova/api/ec2/apirequest.py
+++ b/nova/api/ec2/apirequest.py
@@ -52,9 +52,11 @@ def _try_convert(value):
return True
if value == 'False':
return False
- if value == '0':
- return 0
valueneg = value[1:] if value[0] == '-' else value
+ if valueneg == '0':
+ return 0
+ if valueneg == '':
+ return value
if valueneg[0] == '0':
if valueneg[1] in 'xX':
return int(value,16)