fix interface get type in get_conf 13/26413/3
authorZhou Ya <zhou.ya@zte.com.cn>
Thu, 22 Dec 2016 06:34:51 +0000 (14:34 +0800)
committerzhou ya <zhou.ya@zte.com.cn>
Tue, 3 Jan 2017 02:25:12 +0000 (02:25 +0000)
to kill '[0]' in get_conf.py file

Change-Id: I82282ff8431bf3eb93746e505e18547929f20ed9
Signed-off-by: Zhou Ya <zhou.ya@zte.com.cn>
deploy/get_conf.py

index eaac8b1..c3f7e42 100755 (executable)
@@ -23,8 +23,9 @@ def decorator_mk(types):
             result = {}
             for item in item_list:
                 ret = func(item)
-                if ret.keys()[0] in result:
-                    result[ret.keys()[0]].append(ret.values()[0][0])
+                item_name = ret.keys().pop()
+                if result is not None and item_name in result:
+                    result[item_name] = result[item_name] + ret[item_name]
                 else:
                     result.update(ret)
             return result