Module: check_mk
Branch: master
Commit: f781146303a4f47d4293908231734ae3f2a64f3d
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=f781146303a4f4…
Author: Moritz Kiemer <mo(a)mathias-kettner.de>
Date: Wed Dec 19 14:16:35 2018 +0100
mk_filestats: encode utf8 path
Change-Id: Ia5add050b7fffc7fd798e45aea4bb87db33773c3
---
agents/plugins/mk_filestats.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/agents/plugins/mk_filestats.py b/agents/plugins/mk_filestats.py
index 79df6d6..c85a56b 100755
--- a/agents/plugins/mk_filestats.py
+++ b/agents/plugins/mk_filestats.py
@@ -172,8 +172,9 @@ class LazyFileStats(object):
LOGGER.debug("os.stat(%r)", self.path)
+ path = self.path.encode('utf8')
try:
- stat = os.stat(self.path)
+ stat = os.stat(path)
except OSError, exc:
self.stat_status = "file vanished" if exc.errno == 2 else str(exc)
return