1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-12-26 01:46:13 +01:00

branch_pkg: fix use of undefined variable

This commit is contained in:
Andreas Schwab 2015-10-07 16:27:55 +02:00
parent 400352c61e
commit 4e83af8294

View File

@ -5064,10 +5064,11 @@ def branch_pkg(apiurl, src_project, src_package, nodevelproject=False, rev=None,
raise
return (True, m.group(1), m.group(2), None, None)
root = ET.fromstring(f.read())
if conf.config['http_debug']:
print(ET.tostring(root, encoding=ET_ENCODING), file=sys.stderr)
data = {}
for i in ET.fromstring(f.read()).findall('data'):
for i in root.findall('data'):
data[i.get('name')] = i.text
return (False, data.get('targetproject', None), data.get('targetpackage', None),
data.get('sourceproject', None), data.get('sourcepackage', None))