From 9913168896819edf1dbca66f526d2bbe1f83b30b Mon Sep 17 00:00:00 2001 From: Rod A Santiago Date: Wed, 14 Sep 2016 18:05:52 -0700 Subject: [PATCH] Fixed sendnodeemuid to use the handler's sendall() method instead of BaseRequestHandler's request.sendall(). Added a method to retrieve a configuration item by key. --- daemon/core/session.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/daemon/core/session.py b/daemon/core/session.py index 223bd9e9..85fb49d3 100644 --- a/daemon/core/session.py +++ b/daemon/core/session.py @@ -766,7 +766,7 @@ class Session(object): | coreapi.CORE_API_LOC_FLAG, tlvdata) try: - handler.request.sendall(reply) + handler.sendall(reply) except Exception, e: self.warn("sendall() for node: %d error: %s" % (nodenum, e)) del handler.nodestatusreq[nodenum] @@ -1250,6 +1250,13 @@ class SessionMetaData(ConfigurableManager): def additem(self, key, value): self.configs[key] = value + def getitem(self, key): + try: + return self.configs[key] + except KeyError: + pass + return None + def items(self): return self.configs.iteritems()