1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-21 10:39:53 +00:00

knot: use os.path.join, don't hardcode "/"

This commit is contained in:
Kim B. Heino 2021-04-02 22:54:18 +03:00 committed by Lars Kruse
parent 9759634977
commit a47b05ae11

View file

@ -122,7 +122,7 @@ def get_stats():
# After server reboot output can be almost empty. Use cached results
# instead, needed for plugin config when using munin-async.
cachename = os.getenv('MUNIN_PLUGSTATE') + '/knot.state'
cachename = os.path.join(os.getenv('MUNIN_PLUGSTATE'), 'knot.state')
if len(output) > 2048:
with open(cachename, 'wt') as cache:
cache.write(output)