[checkmk-commits] Check_MK Git: check_mk: Fixed ImportError "Cannot import name attrencode" when importing wato module (at least in some rare situations/ python versions)

git version control git at mathias-kettner.de
Thu Nov 8 09:02:39 CET 2012


Module: check_mk
Branch: master
Commit: 04c4a2236e368c1e6ab552c88ac4b72f7856ae88
URL:    http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=04c4a2236e368c1e6ab552c88ac4b72f7856ae88

Author: Lars Michelsen <lm at mathias-kettner.de>
Date:   Thu Nov  8 09:02:12 2012 +0100

Fixed ImportError "Cannot import name attrencode" when importing wato module (at least in some rare situations/python versions)

---

 web/htdocs/valuespec.py |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/web/htdocs/valuespec.py b/web/htdocs/valuespec.py
index 0801d6b..5da0caa 100644
--- a/web/htdocs/valuespec.py
+++ b/web/htdocs/valuespec.py
@@ -24,9 +24,8 @@
 # to the Free Software Foundation, Inc., 51 Franklin St,  Fifth Floor,
 # Boston, MA 02110-1301 USA.
 
-import math, os, time, re, sre_constants, urlparse, forms
+import math, os, time, re, sre_constants, urlparse, forms, htmllib
 from lib import *
-from htmllib import attrencode
 
 # Abstract base class of all value declaration classes.
 class ValueSpec:
@@ -310,7 +309,7 @@ class TextAscii(ValueSpec):
             return _("none")
         else:
             if self._attrencode:
-                return attrencode(value)
+                return htmllib.attrencode(value)
             else:
                 return value
 



More information about the checkmk-commits mailing list