Verified Commit ec918c27 authored by Adam Mercer's avatar Adam Mercer
Browse files

only attempt to register package if required

parent b653a55b
......@@ -115,17 +115,15 @@ def main():
try:
koji.list_pkgs('--quiet', '--package', pkg_name, logger=logger)
except subprocess.CalledProcessError:
pass
# register package with koji
if args.owner is None:
logger.critical("owner not specified")
sys.exit(1)
try:
koji.add_pkg(args.owner, pkg_name, logger=logger)
except subprocess.CalledProcessError as e:
logger.critical("unable to regsiter package: %s" % e)
raise
# register package with koji
if args.owner is None:
logger.critical("owner not specified")
sys.exit(1)
try:
koji.add_pkg(args.owner, pkg_name, logger=logger)
except subprocess.CalledProcessError as e:
logger.critical("unable to regsiter package: %s" % e)
raise
logger.info("-- Complete -----")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment