Format code with black

This commit is contained in:
James Campbell 2025-06-02 03:41:15 -04:00
parent 375bf6a982
commit 22ae634a87
Signed by: james
GPG Key ID: 2287C33A40DC906A

View File

@ -496,6 +496,7 @@ def get_cluster_version():
return cluster_version
def version_num_to_release(version_num):
"""
Extract the revease from a version_num.
@ -531,7 +532,9 @@ def parse_version_rss(raw_rss, release):
global release_supported
# Regular expressions for parsing the RSS document
version_line = re.compile(r".*?([0-9][0-9.]+) is the latest release in the {} series.*".format(release))
version_line = re.compile(
r".*?([0-9][0-9.]+) is the latest release in the {} series.*".format(release)
)
unsupported_line = re.compile(r"^This version is unsupported")
# Loop through the RSS until we find the current release
@ -550,9 +553,7 @@ def parse_version_rss(raw_rss, release):
"{}{:02}{:02}".format(parts[0], parts[1], parts[2])
)
else:
latest_version = int(
"{}00{:02}".format(parts[0], parts[1])
)
latest_version = int("{}00{:02}".format(parts[0], parts[1]))
elif release_found:
# The next line after the version tells if the version is supported
if unsupported_line.match(line):
@ -563,9 +564,7 @@ def parse_version_rss(raw_rss, release):
# Make sure we actually found it
if not release_found:
raise LatestVersionCheckError(
"Current release ({}) not found".format(release)
)
raise LatestVersionCheckError("Current release ({}) not found".format(release))
log.info(
"Got latest PostgreSQL version: {} supported={}".format(