From 5af4cdf2976026c641d2631b6d3a1c5f60a3c5e4 Mon Sep 17 00:00:00 2001 From: Tomas Kopecek Date: Apr 06 2020 07:27:14 +0000 Subject: PR#2128: hub: document getExternalRepo arguments Merges #2128 https://pagure.io/koji/pull-request/2128 Relates #2134 https://pagure.io/koji/issue/2134 --- diff --git a/hub/kojihub.py b/hub/kojihub.py index cd8b4c9..d0ad67d 100644 --- a/hub/kojihub.py +++ b/hub/kojihub.py @@ -3592,11 +3592,19 @@ def get_external_repos(info=None, url=None, event=None, queryOpts=None): def get_external_repo(info, strict=False, event=None): - """Get information about a single external repo. - info can either be a string (name) or an integer (id). - Returns a map containing the id, name, and url of the - repo. If strict is True and no external repo has the - given name or id, raise an error.""" + """ + Get information about a single external repository. + + :param info: a string (name) or an integer (id). + :param bool strict: If True, raise an error if we found no matching + repository. If False, simply return None if we found + no matching repository. If unspecified, the default + value is False. + :param int event: The event ID at which to search. If unspecified, the + default behavior is to search for the "active" repo + settings. + :returns: a map containing the id, name, and url of the repository. + """ repos = get_external_repos(info, event=event) if repos: return repos[0]