Skip to content

Commit

Permalink
Fix: REDHAT9 parsing issue
Browse files Browse the repository at this point in the history
  • Loading branch information
naparuba committed Sep 14, 2024
1 parent 54f6478 commit 151ba9f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions opsbro/systempacketmanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ def __init__(self):
with open('/etc/os-release') as f:
inf = {}
for line in f:
if '=' not in line: # redhat 9 seems to have issue with basic things
continue
k, v = line.rstrip().split("=")
# .strip('"') will remove if there or else do nothing
inf[k] = v.strip('"')
Expand All @@ -64,6 +66,8 @@ def __init__(self):
with open('/etc.defaults/VERSION') as f:
inf = {}
for line in f:
if '=' not in line: # redhat 9 seems to have issue with basic things
continue
k, v = line.rstrip().split("=")
# .strip('"') will remove if there or else do nothing
inf[k] = v.strip('"')
Expand Down

0 comments on commit 151ba9f

Please sign in to comment.