diff --git a/check_forgejo_upgrade b/check_forgejo_upgrade index fd78a23..3483d13 100755 --- a/check_forgejo_upgrade +++ b/check_forgejo_upgrade @@ -44,6 +44,9 @@ parser.add_argument( dest="include_rc", help="Allow release candidate (default: only stable release are considered)", ) +parser.add_argument( + "-t", "--timeout", type=int, help="Specify timeout for HTTP requests (default: 20)", default=20 +) options = parser.parse_args() @@ -77,7 +80,7 @@ if not CURRENT: LATEST = None try: logging.debug("Get releases RSS feed from %s...", options.url) - r = requests.get(options.url) + r = requests.get(options.url, timeout=options.timeout) logging.debug("Data retreive:\n%s", r.text) data = xmltodict.parse(r.text) for item in data["rss"]["channel"]["item"]: