mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Wrap the report with meta infos
This commit is contained in:
parent
f11206c0fa
commit
12df96f33e
2 changed files with 4 additions and 4 deletions
|
@ -38,7 +38,6 @@ class IPDiagnoser(Diagnoser):
|
|||
report = ("SUCCESS", "diagnosis_network_connected_ipv6", {}) if ipv6 \
|
||||
else ("WARNING", "diagnosis_network_no_ipv6", {}))
|
||||
|
||||
|
||||
def get_public_ip(self, protocol=4):
|
||||
|
||||
if protocol == 4:
|
||||
|
|
|
@ -110,13 +110,14 @@ class Diagnoser():
|
|||
|
||||
def report(self):
|
||||
|
||||
print(self.cached_time_ago())
|
||||
|
||||
if self.args.get("force", False) or self.cached_time_ago() < self.cache_duration:
|
||||
self.logger_debug("Using cached report from %s" % self.cache_file)
|
||||
return self.get_cached_report()
|
||||
|
||||
new_report = list(self.run())
|
||||
new_report = { "id": self.id_,
|
||||
"cached_for": self.cache_duration,
|
||||
"reports": list(self.run())
|
||||
}
|
||||
|
||||
# TODO / FIXME : should handle the case where we only did a partial diagnosis
|
||||
self.logger_debug("Updating cache %s" % self.cache_file)
|
||||
|
|
Loading…
Add table
Reference in a new issue