check if cache is valid
This commit is contained in:
parent
9f109d6228
commit
e4339517df
1 changed files with 5 additions and 1 deletions
|
|
@ -80,7 +80,11 @@ class BoobankMuninPlugin(object):
|
||||||
except IOError:
|
except IOError:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
last = int(f.readline().strip())
|
try:
|
||||||
|
last = int(f.readline().strip())
|
||||||
|
except ValueError:
|
||||||
|
return False
|
||||||
|
|
||||||
if (last + self.cache_expire) < time.time():
|
if (last + self.cache_expire) < time.time():
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue