1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-01-11 16:36:14 +01:00

Fix non-existent user handling in do_my/get_user_projpkgs_request_list

This fixes the issue reported in PR #227.
This commit is contained in:
Marcus Huewe 2016-09-13 12:34:48 +02:00
parent 07e0628d9e
commit e9cc000987
2 changed files with 5 additions and 3 deletions

View File

@ -6897,9 +6897,9 @@ Please submit there instead, or use --nodevelproject to force direct submission.
print("")
return
except HTTPError as e:
if e.code == 400:
# skip it ... try again with old style below
pass
if e.code != 400:
raise e
# skip it ... try again with old style below
res = get_user_projpkgs(apiurl, user, role_filter, exclude_projects,
'project' in what, 'package' in what,

View File

@ -4321,6 +4321,8 @@ def get_user_projpkgs_request_list(apiurl, user, req_state=('new', 'review', ),
for i in res['package_id'].findall('package'):
if not i.get('project') in projects:
projpkgs.setdefault(i.get('project'), []).append(i.get('name'))
if not projpkgs:
return []
xpath = ''
for prj, pacs in projpkgs.items():
if not len(pacs):