summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--oslo_utils/imageutils.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/oslo_utils/imageutils.py b/oslo_utils/imageutils.py
index 8a7fe6e..65292dc 100644
--- a/oslo_utils/imageutils.py
+++ b/oslo_utils/imageutils.py
@@ -66,11 +66,12 @@ class QemuImgInfo(object):
self.encrypted = details.get('encrypted')
self.format_specific = details.get('format-specific')
else:
- debtcollector.deprecate(
- 'The human format is deprecated and the format parameter '
- 'will be removed. Use explicitly json instead',
- version="xena",
- category=FutureWarning)
+ if cmd_output is not None:
+ debtcollector.deprecate(
+ 'The human format is deprecated and the format parameter '
+ 'will be removed. Use explicitly json instead',
+ version="xena",
+ category=FutureWarning)
details = self._parse(cmd_output or '')
self.image = details.get('image')
self.backing_file = details.get('backing_file')