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")