1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-09-05 20:58:42 +02:00

helpful messages about non-existing remote packages never made it to the

user, as meta_exists() died with a shorter message earler.
This commit is contained in:
Juergen Weigert
2010-03-07 23:07:03 +01:00
parent f25bfa6ad1
commit a92a63ad4d

View File

@@ -515,11 +515,19 @@ def main(opts, argv):
bc_file.flush()
except urllib2.HTTPError, e:
if e.code == 404:
# check what caused the 404
# check what caused the 404
if meta_exists(metatype='prj', path_args=(quote_plus(prj), ),
template_args=None, create_new=False, apiurl=apiurl):
if pac == '_repository' or meta_exists(metatype='pkg', path_args=(quote_plus(prj), quote_plus(pac)),
template_args=None, create_new=False, apiurl=apiurl):
pkg_meta_e = None
try:
# take care, not to run into double trouble.
pkg_meta_e = meta_exists(metatype='pkg', path_args=(quote_plus(prj),
quote_plus(pac)), template_args=None, create_new=False,
apiurl=apiurl)
except:
pass
if pac == '_repository' or pkg_meta_e:
print >>sys.stderr, 'ERROR: Either wrong repo/arch as parameter or a parse error of .spec/.dsc/.kiwi file due to syntax error'
else:
print >>sys.stderr, 'The package \'%s\' does not exists - please ' \