metatype = 'prj'
path_args = [core.quote_plus(prj)]
+ if pkg:
+ metatype = 'pkg'
+ path_args.append(core.quote_plus(pkg))
err = None
try:
core.meta_exists(metatype = metatype, path_args = tuple(path_args),
create_new = False, apiurl = self.apiurl)
- if not pkg:
- return True
-
- if pkg in core.meta_get_packagelist(self.apiurl, prj):
- return True
- else:
- return False
except urllib2.HTTPError, err:
if err.code == 404:
return False
if err:
raise ObsError("can't check if %s/%s exists: %s" % (prj, pkg, err))
- return False
+ return True
def rebuild(self, prj, pkg, arch):
"""Rebuild package."""