SM2Gen/trykoji.py

11 lines
322 B
Python
Raw Normal View History

2024-10-18 16:34:35 +02:00
import koji
mytag = "mytag"
session = koji.ClientSession("http://koji.koozali.org/kojihub")
try:
repo_info = session.getRepo(mytag, koji.REPO_STATES["READY"], dist=True)
if not repo_info:
print(f"There is no active dist repo for {mytag}")
except koji.GenericError:
print(f"Tag {mytag} doesn't exist")