[Reproducible-commits] [misc] 01/02: reports: generate-draft: ensure the cache is newer than the script itself
Ximin Luo
infinity0 at debian.org
Mon Aug 22 15:58:17 UTC 2016
This is an automated email from the git hooks/post-receive script.
infinity0 pushed a commit to branch master
in repository misc.
commit 7d9933cf588acb00d6ef0518d6e0ef1eb0d95e6a
Author: Ximin Luo <infinity0 at debian.org>
Date: Mon Aug 22 16:13:15 2016 +0200
reports: generate-draft: ensure the cache is newer than the script itself
---
reports/bin/generate-draft | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/reports/bin/generate-draft b/reports/bin/generate-draft
index 8416054..d14d0ef 100755
--- a/reports/bin/generate-draft
+++ b/reports/bin/generate-draft
@@ -60,8 +60,9 @@ def get_data(week, max_age=3600):
try:
mtime = os.path.getmtime(filename)
+ mtime_me = os.path.getmtime(__file__)
- if mtime >= time.time() - max_age:
+ if mtime > mtime_me and mtime >= time.time() - max_age:
log("Using cache from {}", filename)
with open(filename, 'rb') as f:
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/misc.git
More information about the Reproducible-commits
mailing list