prometheus-community / node-exporter-textfile-collector-scripts

Scripts for node-exporter's textfile collector
Apache License 2.0
508 stars 188 forks source link

deleted-libraries.py: fix exception handling and miss-counting #169

Open equinox0815 opened 1 year ago

equinox0815 commented 1 year ago

EnvironmentError exceptions deprecated since Python 3.3 and are now longer used. I have this changes running since over a year now and have never encountered any other exceptions than FileNotFoundError or ProcessLookupError. Also due to an indentation error the metric values could never reach anything above 1 even if the outdated library is used more than once.