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.
This commit is contained in:
parent
1b8c195c75
commit
9913168896
1 changed files with 8 additions and 1 deletions
|
@ -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()
|
||||
|
||||
|
|
Loading…
Reference in a new issue