Commit 910cd692 authored by shadMod's avatar shadMod 💬

added typology in get_releases() return

added get_releases() docs param
parent 4b18761e
...@@ -210,8 +210,13 @@ class CompileVersion: ...@@ -210,8 +210,13 @@ class CompileVersion:
def get_releases(self, data: list, distro: str, arch: str) -> (dict, str): def get_releases(self, data: list, distro: str, arch: str) -> (dict, str):
""" """
version, codename, host = None, None, None :param data: list of all versions
for version, codename, name in sorted(data, key=lambda x: x[0], reverse=True): :param distro: name of the distro
:param arch: name of the architecture
"""
host = None
for version, codename, name, typology in data:
host = None host = None
for http, path in self.data_sources: for http, path in self.data_sources:
try: try:
...@@ -233,8 +238,8 @@ class CompileVersion: ...@@ -233,8 +238,8 @@ class CompileVersion:
"version": version, "version": version,
"codename": codename, "codename": codename,
"host": host, "host": host,
"lts": False if typology == "latest" else True, "lts": False if typology == "interim" else True,
} }, typology
if host is None: if host is None:
raise Exception("No correct host") raise Exception("No correct host")
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment