summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorharlowja <harlowja@virtualbox.rhel>2012-06-22 08:50:51 -0700
committerharlowja <harlowja@virtualbox.rhel>2012-06-22 08:50:51 -0700
commit7563328f1f08290a0d63e9e9e6da16b01ab4b5b8 (patch)
tree4f786000c0ef77ff97a5ea4ae7e4a13fa4fb4127
parent5ea5f2c931b32ad1776b0dc108009affceea5389 (diff)
downloadvyos-cloud-init-7563328f1f08290a0d63e9e9e6da16b01ab4b5b8.tar.gz
vyos-cloud-init-7563328f1f08290a0d63e9e9e6da16b01ab4b5b8.zip
ConfigObj is a requirement now, so no need to see if
the import worked or failed.
-rw-r--r--cloudinit/stages.py10
1 files 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)