Commit 01727900 authored by shadMod's avatar shadMod 💬

added property ver_lts_list and ver_interim_list in CompileVersion() to get...

added property ver_lts_list and ver_interim_list in CompileVersion() to get all version LTS adn Interim
parent 7c4642b9
Pipeline #308 passed with stage
in 0 seconds
......@@ -55,11 +55,19 @@ class CompileVersion(object):
@property
def ver_lts(self) -> str:
return max(self.get_list_version()["LTS"])
return max(self.ver_lts_list)
@property
def ver_interim(self) -> str:
return max(self.get_list_version()["Interim"])
return max(self.ver_interim_list)
@property
def ver_lts_list(self) -> list:
return self.get_list_version()["LTS"]
@property
def ver_interim_list(self) -> list:
return self.get_list_version()["Interim"]
def get_list_version(self) -> dict:
res = requests.get(self.path_url)
......@@ -127,6 +135,21 @@ class CompileVersion(object):
def get_archs_releases(self, codename: str, version: str, distro: str, arch: str) -> str:
http = None
# for version, _, _ in self.ver_interim_list:
# for http, path in self.data_sources:
# try:
# conn = urlopen(path.format(codename=codename, version=version, distro=distro, arch=arch))
# except HTTPError:
# pass
# except ValueError:
# pass
# else:
# conn.close()
# break
# if http:
# break
for http, path in self.data_sources:
try:
conn = urlopen(path.format(codename=codename, version=version, distro=distro, arch=arch))
......
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