From 7563328f1f08290a0d63e9e9e6da16b01ab4b5b8 Mon Sep 17 00:00:00 2001 From: harlowja <harlowja@virtualbox.rhel> Date: Fri, 22 Jun 2012 08:50:51 -0700 Subject: ConfigObj is a requirement now, so no need to see if the import worked or failed. --- cloudinit/stages.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/cloudinit/stages.py b/cloudinit/stages.py index 9481db83..595f7aea 100644 --- a/cloudinit/stages.py +++ b/cloudinit/stages.py @@ -26,10 +26,7 @@ import copy import os import sys -try: - from configobj import ConfigObj -except ImportError: - ConfigObj = None +from configobj import ConfigObj from cloudinit.settings import (OLD_CLOUD_CONFIG) from cloudinit.settings import (PER_INSTANCE, FREQUENCIES) @@ -68,10 +65,7 @@ class Init(object): self.datasource = None def _read_cfg_old(self): - # Support reading the old ConfigObj format file and merging - # it into the yaml dictionary - if not ConfigObj: - return {} + # Support reading the old ConfigObj format file old_cfg = ConfigObj(OLD_CLOUD_CONFIG) return dict(old_cfg) -- cgit v1.2.3