2
0
mirror of https://github.com/munin-monitoring/contrib.git synced 2018-11-08 00:59:34 +01:00

Improved how the statefile last modified date is updated

This commit is contained in:
Neraud 2018-08-03 15:39:12 +02:00
parent 7bc4d133d9
commit e0b243ba93

View File

@ -101,6 +101,7 @@ GPLv2
import logging
import os
from pathlib import Path
from random import randint
import re
from subprocess import check_output, call, DEVNULL, CalledProcessError
@ -231,7 +232,9 @@ def do_update_repos():
logging.error('Repo not found at path %s' %
repos_conf[repo_code]['path'])
logging.debug('Updating the state file')
open(conf['state_file'], 'w')
# 'touch' the state file to update its last modified date
Path(conf['state_file']).touch()
if len(sys.argv) > 1: