diff options
| author | Vishvananda Ishaya <vishvananda@yahoo.com> | 2010-10-14 01:11:18 -0700 |
|---|---|---|
| committer | Vishvananda Ishaya <vishvananda@yahoo.com> | 2010-10-14 01:11:18 -0700 |
| commit | 1156100be1d358f5ffae58c6d892e0724f4d153c (patch) | |
| tree | 3b3898acdba3b5837cfabb5ad724d1fa4a9c70df /nova/api | |
| parent | c829e39c5436f2c9f075713ff4b80dbdfb1239ef (diff) | |
unit tests and fix
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/ec2/apirequest.py | 6 |
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) |
