Module: check_mk
Branch: master
Commit: 82dd9ee09e96548770627b420e32faefb0d2fe60
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=82dd9ee09e9654…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Aug 28 12:32:59 2017 +0200
read_cache_file: Removed ancient read with size limitation
Change-Id: Ia03860932c4039ae0bb0d0304bab03e0f9e98973
---
cmk_base/agent_data.py | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/cmk_base/agent_data.py b/cmk_base/agent_data.py
index 8b7806b..5d6ffb5 100644
--- a/cmk_base/agent_data.py
+++ b/cmk_base/agent_data.py
@@ -565,10 +565,8 @@ def read_cache_file(relpath, max_cache_age):
(opt_use_cachefile and ( not _no_cache ) )
or (config.simulation_mode and not _no_cache) ):
if cmk_base.utils.cachefile_age(cachefile) <= max_cache_age or
config.simulation_mode:
- f = open(cachefile, "r")
- result = f.read(100000000)
- f.close()
- if len(result) > 0:
+ result = open(cachefile).read()
+ if result:
console.verbose("Using data from cachefile %s.\n" % cachefile)
return result
else: