From 5dbee5ea9e5b428a13e9498898fff70bbec0d660 Mon Sep 17 00:00:00 2001 From: Iustin Pop Date: Wed, 18 Jul 2012 14:18:12 +0200 Subject: [PATCH] Ensure that disk.params is always defined (and a dict) MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Commit cce46164 fixed upgrading from other 2.6 versions, but accidentally broke upgrading from 2.5 (disk.params was left as None, which breaks FillDict). The simplest way to handle params is to always set them to an empty dict (disregarding what they currently contain). Signed-off-by: Iustin Pop Reviewed-by: René Nussbaumer --- lib/objects.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/objects.py b/lib/objects.py index 2c74e9c..40c76ae 100644 --- a/lib/objects.py +++ b/lib/objects.py @@ -845,8 +845,7 @@ class Disk(ConfigObject): child.UpgradeConfig() # FIXME: Make this configurable in Ganeti 2.7 - if self.params: - self.params = {} + self.params = {} # add here config upgrade for this disk @staticmethod -- 1.7.10.4