Module: check_mk
Branch: master
Commit: 36d49614b742618514698a5eaaf751aa8b709fde
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=36d49614b74261…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Jul 13 09:06:36 2018 +0200
Fixed missing _ in cmk code after making pylint check for this variable
Change-Id: Ic27056e5e5f532a6f331d5e8b7d5cb54c07248d2
---
cmk/__init__.py | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/cmk/__init__.py b/cmk/__init__.py
index f4e87f0..d0cec5b 100644
--- a/cmk/__init__.py
+++ b/cmk/__init__.py
@@ -36,6 +36,14 @@ import os
import cmk.paths
from cmk.exceptions import MKGeneralException
+# TODO: Clean this up one day by using the way recommended by gettext.
+# (See
https://docs.python.org/2/library/gettext.html). For this we
+# need the path to the locale files here.
+try:
+ _
+except NameError:
+ _ = lambda x: x # Fake i18n when not available
+
def omd_version():
return os.path.basename(os.readlink(cmk.paths.omd_root + "/version"))