summaryrefslogtreecommitdiffstats
path: root/nova/api
diff options
context:
space:
mode:
authorVishvananda Ishaya <vishvananda@yahoo.com>2010-10-14 01:11:18 -0700
committerVishvananda Ishaya <vishvananda@yahoo.com>2010-10-14 01:11:18 -0700
commit1156100be1d358f5ffae58c6d892e0724f4d153c (patch)
tree3b3898acdba3b5837cfabb5ad724d1fa4a9c70df /nova/api
parentc829e39c5436f2c9f075713ff4b80dbdfb1239ef (diff)
unit tests and fix
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)