src/watchdog/src/watchdog.py
def try_remove_old_prom_file(path):
    """ try to remove old prom file, since old prom file are exposed by node-exporter,
    if we do not remove, node-exporter will still expose old metrics """
    if os.path.isfile(path):
        try:
            os.unlink(path)
        except Exception as e:
            logger.warning("can not remove old prom file %s", path)
 try to remove old prom file, since old prom file are exposed by node-exporter,
    if we do not remove, node-exporter will still expose old metrics 
try to remove old prom file, since old prom file are exposed by node-exporter,
if we do not remove, node-exporter will still expose old metrics
try to remove old prom file since old prom file are exposed by node - exporter if we do not remove node - exporter will still expose old metrics
def try_remove_old_prom_file(path):
    if os.path.isfile(path):
        try:
            os.unlink(path)
        except Exception as e:
            logger.warning("can not remove old prom file %s", path)
def try_remove_old_prom_file ( path ) : if os . path . isfile ( path ) : try : os . unlink ( path ) except Exception as e : logger . warning ( "can not remove old prom file %s" , path )
try to remove old prom file, since old prom file are exposed by node-exporter,
if we do not remove, node-exporter will still expose old metrics
try to remove old prom file since old prom file are exposed by node - exporter if we do not remove node - exporter will still expose old metrics
""" try to remove old prom file, since old prom file are exposed by node-exporter,
    if we do not remove, node-exporter will still expose old metrics """
path