diff options
| author | Zhongyue Luo <zhongyue.nah@intel.com> | 2013-06-14 09:22:54 +0800 |
|---|---|---|
| committer | Zhongyue Luo <zhongyue.nah@intel.com> | 2013-06-14 09:35:00 +0800 |
| commit | fc217a996a251d1c9e4f495f6d0fbf80b80700bc (patch) | |
| tree | 84fdfb4d0bbc4f99c05b65b7a22f3e0426f65db6 /nova/virt | |
| parent | ab1977af316eef5375c7aaefdf364548b4fb5289 (diff) | |
Replace utils.to_bytes() with strutils.to_bytes()
The to_bytes() function have moved to oslo.
Replaced/removed the to_bytes() function with the one in strutils
Change-Id: I14c33c6fb86db3088c11e02ce6e38ec022fad042
Diffstat (limited to 'nova/virt')
| -rwxr-xr-x | nova/virt/images.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/nova/virt/images.py b/nova/virt/images.py index 08d275bc6..d34157444 100755 --- a/nova/virt/images.py +++ b/nova/virt/images.py @@ -30,6 +30,7 @@ from nova import exception from nova.image import glance from nova.openstack.common import fileutils from nova.openstack.common import log as logging +from nova.openstack.common import strutils from nova import utils LOG = logging.getLogger(__name__) @@ -90,8 +91,8 @@ class QemuImgInfo(object): if real_size: details = real_size.group(1) try: - details = utils.to_bytes(details) - except (TypeError, ValueError): + details = strutils.to_bytes(details) + except TypeError: pass return details |
