Module: check_mk
Branch: master
Commit: 2a5b6e29021727cae3db9a67eac9672642ad7925
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2a5b6e29021727…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Wed Jan 9 09:38:25 2019 +0100
Deobfuscation: Request.set_var() only sets a variable now.
Change-Id: Ide0f03e558610e2a92a532552e13528a65cc68bc
---
cmk/gui/http.py | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/cmk/gui/http.py b/cmk/gui/http.py
index 722999e..8ad9aeb 100644
--- a/cmk/gui/http.py
+++ b/cmk/gui/http.py
@@ -172,15 +172,9 @@ class Request(object):
# TODO: self._vars should be strictly read only in the Request() object
def set_var(self, varname, value):
- if value is None:
- self.del_var(varname)
-
- elif isinstance(value, six.string_types):
- self._vars[varname] = value
-
- else:
- # crash report please
+ if not isinstance(value, six.string_types):
raise TypeError(_("Only str and unicode values are allowed, got
%s") % type(value))
+ self._vars[varname] = value
# TODO: self._vars should be strictly read only in the Request() object
def del_var(self, varname):