1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-02-25 03:32:15 +01:00

show branch errors again

This commit is contained in:
Adrian Schröter 2016-04-11 10:45:40 +02:00
parent 51fe8e1401
commit a3684394a1

View File

@ -5084,11 +5084,11 @@ def branch_pkg(apiurl, src_project, src_package, nodevelproject=False, rev=None,
if missingok: if missingok:
if root and root.get('code') == "not_missing": if root and root.get('code') == "not_missing":
raise oscerr.NotMissing("Package exists already via project link, but link will point to given project") raise oscerr.NotMissing("Package exists already via project link, but link will point to given project")
if not return_existing:
raise
summary = root.find('summary') summary = root.find('summary')
if summary is None: if summary is None:
raise oscerr.APIError('unexpected response:\n%s' % ET.tostring(root, encoding=ET_ENCODING)) raise oscerr.APIError('unexpected response:\n%s' % ET.tostring(root, encoding=ET_ENCODING))
if not return_existing:
raise oscerr.APIError('failed to branch: %s' % summary.text)
m = re.match(r"branch target package already exists: (\S+)/(\S+)", summary.text) m = re.match(r"branch target package already exists: (\S+)/(\S+)", summary.text)
if not m: if not m:
e.msg += '\n' + summary.text e.msg += '\n' + summary.text