Skip to content

Commit

Permalink
Removes unnecessary else..pass statement in os-release parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuel FORESTIER committed Feb 13, 2022
1 parent 45fe13d commit 68c163c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/distro/distro.py
Original file line number Diff line number Diff line change
Expand Up @@ -1056,12 +1056,10 @@ def _parse_os_release_content(lines: TextIO) -> Dict[str, str]:
# stripped, etc.), so the tokens are now either:
# * variable assignments: var=value
# * commands or their arguments (not allowed in os-release)
# Ignore any tokens that are not variable assignments
if "=" in token:
k, v = token.split("=", 1)
props[k.lower()] = v
else:
# Ignore any tokens that are not variable assignments
pass

if "version" in props:
# extract release codename (if any) from version attribute
Expand Down

0 comments on commit 68c163c

Please sign in to comment.