Skip to content

Commit 91aa0df

Browse files
Samuel FORESTIERHorlogeSkynet
authored andcommitted
Removes unnecessary else..pass statement in os-release parsing
1 parent a08f31b commit 91aa0df

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

src/distro/distro.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1056,12 +1056,10 @@ def _parse_os_release_content(lines: TextIO) -> Dict[str, str]:
10561056
# stripped, etc.), so the tokens are now either:
10571057
# * variable assignments: var=value
10581058
# * commands or their arguments (not allowed in os-release)
1059+
# Ignore any tokens that are not variable assignments
10591060
if "=" in token:
10601061
k, v = token.split("=", 1)
10611062
props[k.lower()] = v
1062-
else:
1063-
# Ignore any tokens that are not variable assignments
1064-
pass
10651063

10661064
if "version" in props:
10671065
# extract release codename (if any) from version attribute

0 commit comments

Comments
 (0)