Skip to content

Commit fa43a62

Browse files
author
Samuel FORESTIER
committed
Removes unnecessary else..pass statement in os-release parsing
1 parent 84b7afd commit fa43a62

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

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)