exception to KeyError: linkedbuild of repo_element.attrib.pop() 54/71054/1
authorYonghee Han <onstudy@samsung.com>
Tue, 24 May 2016 02:05:29 +0000 (11:05 +0900)
committerYonghee Han <onstudy@samsung.com>
Tue, 24 May 2016 02:05:29 +0000 (11:05 +0900)
Change-Id: Ic1dbbc2efdae235175810612249162c256aa62f1

common/buildservice.py

index 6bbecca..aed77c6 100755 (executable)
@@ -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)