From a816b38e04852bd29b6d4c0082b603d2f8175ac3 Mon Sep 17 00:00:00 2001 From: Yonghee Han Date: Tue, 24 May 2016 11:05:29 +0900 Subject: [PATCH] exception to KeyError: linkedbuild of repo_element.attrib.pop() Change-Id: Ic1dbbc2efdae235175810612249162c256aa62f1 --- common/buildservice.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/buildservice.py b/common/buildservice.py index 6bbecca..aed77c6 100755 --- a/common/buildservice.py +++ b/common/buildservice.py @@ -692,7 +692,8 @@ class BuildService(OSC): xml_root.remove(xml_root.find('link')) # Remove linkedbuild attribute from all repositories for repo_element in xml_root.findall('repository'): - repo_element.attrib.pop('linkedbuild') + if repo_element.attrib.get('linkedbuild') is not None: + repo_element.attrib.pop('linkedbuild') self.set_meta(ElementTree.tostring(xml_root), project) -- 2.7.4