Skip to content

Commit

Permalink
Remove all trailing lines
Browse files Browse the repository at this point in the history
CentOS 7 has multiple
  • Loading branch information
matthewfeickert committed Apr 7, 2023
1 parent 03fa16d commit 84a6b75
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pyhf/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,8 @@ def freedesktop_os_release():
with open(os_release_path, encoding="utf8") as read_file:
os_release_file = read_file.read()
os_release_list = os_release_file.split("\n")
os_release_list.remove("") # Remove trailing line
# Remove all trailing lines
os_release_list = list(filter(("").__ne__, os_release_list))
return {
token.split("=")[0]: token.split("=")[1].replace('"', '')
for token in os_release_list
Expand Down

0 comments on commit 84a6b75

Please sign in to comment.