From 4df53341154442122f98f63a8bf0342839f68a71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Tue, 28 Jul 2009 14:50:23 +0000 Subject: [PATCH] fix set devel project, if no project or package is set --- osc/core.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/osc/core.py b/osc/core.py index 45ca10b6..ab83c3e9 100755 --- a/osc/core.py +++ b/osc/core.py @@ -3778,11 +3778,13 @@ def setDevelProject(apiurl, prj, pac, dprj, dpkg=None): if dprj: elem.attrib['project'] = dprj else: - del elem.attrib['project'] + if elem.attrib.has_key('project'): + del elem.attrib['project'] if dpkg: elem.attrib['package'] = dpkg else: - del elem.attrib['package'] + if elem.attrib.has_key('package'): + del elem.attrib['package'] edit_meta(metatype='pkg', path_args=path, data=ET.tostring(tree))