eo_debian: don't crash on bullseye/sid in /etc/debian_version (#50377)
This commit is contained in:
parent
ed3eae6c2c
commit
b67ddf4d9a
|
@ -49,7 +49,11 @@ def run(cmd):
|
|||
|
||||
def debian(ctn):
|
||||
with open('/etc/debian_version') as fh:
|
||||
ve = float(fh.read().strip())
|
||||
content = fh.read()
|
||||
if 'sid' in content:
|
||||
ve = 9999
|
||||
else:
|
||||
ve = float(content.strip())
|
||||
eo_debian.labels(ctn).set(ve)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue