From 2b3a2979fe0c6cc41088c19fab5908a86cc855e3 Mon Sep 17 00:00:00 2001 From: Davanum Srinivas Date: Tue, 19 Mar 2013 17:25:02 -0400 Subject: Fix missing argument to QemuImageInfo set the default value for cmd_output to None. _parse does work fine with None or empty string Fixes LP# 1157412 Change-Id: Ib63f2fd227633b96db613ce29563d1929536819a --- nova/virt/images.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nova/virt') diff --git a/nova/virt/images.py b/nova/virt/images.py index 50d89bfb8..b40f566a6 100755 --- a/nova/virt/images.py +++ b/nova/virt/images.py @@ -49,7 +49,7 @@ class QemuImgInfo(object): TOP_LEVEL_RE = re.compile(r"^([\w\d\s\_\-]+):(.*)$") SIZE_RE = re.compile(r"\(\s*(\d+)\s+bytes\s*\)", re.I) - def __init__(self, cmd_output): + def __init__(self, cmd_output=None): details = self._parse(cmd_output) self.image = details.get('image') self.backing_file = details.get('backing_file') -- cgit