mirror of
https://github.com/openSUSE/osc.git
synced 2025-01-24 13:56:13 +01:00
treat code 500 as 414 in get_project_sourceinfo
Depending on, e.g., the apache2 configuration, status 500 is returned in case of an "uri too long" error.
This commit is contained in:
parent
3b1409fd33
commit
bdec204600
@ -3767,7 +3767,9 @@ def get_project_sourceinfo(apiurl, project, nofilename, *packages):
|
||||
# old API servers (e.g. 2.3.5) do not know the 'nofilename' parameter, so retry without
|
||||
if e.code == 400 and nofilename:
|
||||
return get_project_sourceinfo(apiurl, project, False, *packages)
|
||||
if e.code != 414:
|
||||
# an uri too long error is sometimes handled as status 500
|
||||
# (depending, e.g., on the apache2 configuration)
|
||||
if e.code not in (414, 500):
|
||||
raise
|
||||
if len(packages) == 1:
|
||||
raise oscerr.APIError('package name too long: %s' % packages[0])
|
||||
|
Loading…
Reference in New Issue
Block a user