Skip to content

Commit a9e3904

Browse files
committed
dont overload (reassign/mutate!) a variable
this confuses the type-checker ;)
1 parent 9a0d7cf commit a9e3904

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

libiocage/lib/Distribution.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -133,18 +133,18 @@ def _get_eol_list(self) -> List[str]:
133133
_eol = "https://www.freebsd.org/security/unsupported.html"
134134
req = requests.get(_eol)
135135
status = req.status_code == requests.codes.ok
136-
eol_releases = []
136+
eol_releases: List[str] = []
137137
if not status:
138138
req.raise_for_status()
139139

140140
for eol in req.content.decode("iso-8859-1").split():
141-
eol = eol.strip("href=").strip("/").split(">")
141+
eol_lines = eol.strip("href=").strip("/").split(">")
142142
# We want a dynamic EOL
143143
try:
144-
if "-RELEASE" in eol[1]:
145-
eol = eol[1].strip('</td')
146-
if eol not in eol_releases:
147-
eol_releases.append(eol)
144+
if "-RELEASE" in eol_lines[1]:
145+
eol_candidate = eol_lines[1].strip('</td')
146+
if eol_candidate not in eol_releases:
147+
eol_releases.append(eol_candidate)
148148
except IndexError:
149149
pass
150150

0 commit comments

Comments
 (0)