Révision e0b243ba
Improved how the statefile last modified date is updated
| plugins/git/git_commit_behind | ||
|---|---|---|
| 101 | 101 |
|
| 102 | 102 |
import logging |
| 103 | 103 |
import os |
| 104 |
from pathlib import Path |
|
| 104 | 105 |
from random import randint |
| 105 | 106 |
import re |
| 106 | 107 |
from subprocess import check_output, call, DEVNULL, CalledProcessError |
| ... | ... | |
| 231 | 232 |
logging.error('Repo not found at path %s' %
|
| 232 | 233 |
repos_conf[repo_code]['path']) |
| 233 | 234 |
logging.debug('Updating the state file')
|
| 234 |
open(conf['state_file'], 'w') |
|
| 235 |
|
|
| 236 |
# 'touch' the state file to update its last modified date |
|
| 237 |
Path(conf['state_file']).touch() |
|
| 235 | 238 |
|
| 236 | 239 |
|
| 237 | 240 |
if len(sys.argv) > 1: |
Formats disponibles : Unified diff