Skip to content

Commit 6f17ee3

Browse files
committed
Remove transient id variable, improve comment and fix Black formatting
1 parent 5be7fea commit 6f17ee3

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/distro/distro.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1301,11 +1301,13 @@ def _distro_release_info(self) -> Dict[str, str]:
13011301
return {}
13021302

13031303
if match is not None:
1304-
distro_info["id"] = id = match.group(1)
1304+
distro_info["id"] = match.group(1)
13051305

1306-
# Armbian release files are not standard and have a comment on
1307-
# the start of the file.
1308-
if id == "armbian" and distro_info.get("name", "").startswith("#"):
1306+
# Armbian release files are not standard as they start with a
1307+
# comment. Manually set name if it has not been inferred.
1308+
if distro_info["id"] == "armbian" and distro_info.get(
1309+
"name", ""
1310+
).startswith("#"):
13091311
distro_info["name"] = "Armbian"
13101312

13111313
# CloudLinux < 7: manually enrich info with proper id.

0 commit comments

Comments
 (0)