mirror of
https://github.com/openSUSE/osc.git
synced 2024-12-25 01:16:14 +01:00
avoid 404 in osc se -V caused by looking up the _history of nonexistant
packages. Workaround for BNC#673654
This commit is contained in:
parent
02f788f12e
commit
d7a1428d69
@ -5341,10 +5341,16 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
|||||||
result.append(package)
|
result.append(package)
|
||||||
|
|
||||||
if opts.version and package != None:
|
if opts.version and package != None:
|
||||||
|
try:
|
||||||
sr = get_source_rev(apiurl,project,package)
|
sr = get_source_rev(apiurl,project,package)
|
||||||
v = sr.get('version')
|
v = sr.get('version')
|
||||||
r = sr.get('rev')
|
r = sr.get('rev')
|
||||||
s = sr.get('srcmd5')
|
s = sr.get('srcmd5')
|
||||||
|
except:
|
||||||
|
# avoid 404 here.
|
||||||
|
# ['search', 'package'] ['match=contains%28description%2C+%27redis%27%29']
|
||||||
|
# returns packages in project 'Ports:DebianBased:Auto', which cannot be examined.
|
||||||
|
pass
|
||||||
if not v or v == 'unknown': v = '-'
|
if not v or v == 'unknown': v = '-'
|
||||||
if not r: r = '-'
|
if not r: r = '-'
|
||||||
if not s: s = '-'
|
if not s: s = '-'
|
||||||
|
Loading…
Reference in New Issue
Block a user