From 64b80e08bc61554e22606edd4153070bcdd18089 Mon Sep 17 00:00:00 2001 From: Scott Moser Date: Wed, 21 Dec 2011 08:54:03 -0500 Subject: fix bug where first entry in the list presented to mergeTogether was ignored --- cloudinit/CloudConfig/cc_landscape.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/cloudinit/CloudConfig/cc_landscape.py b/cloudinit/CloudConfig/cc_landscape.py index 6849b732..e3e4f7ba 100644 --- a/cloudinit/CloudConfig/cc_landscape.py +++ b/cloudinit/CloudConfig/cc_landscape.py @@ -56,10 +56,8 @@ def mergeTogether(objs): merge together ConfigObj objects or things that ConfigObj() will take in later entries override earlier """ - if len(objs) == 0: - return { } - cfg = ConfigObj(objs[1]) - for obj in objs[1:]: + cfg = ConfigObj({}) + for obj in objs: if isinstance(obj, ConfigObj): cfg.merge(obj) else: -- cgit v1.2.3