Change-Id: I4e40e0ef8e80999832846eac3a415fdd767c6d98
This commit is contained in:
Enrico Faulhaber
2017-05-24 17:13:06 +02:00
parent 241af728d6
commit 462b6a0a7e
25 changed files with 130 additions and 84 deletions

View File

@ -27,6 +27,7 @@ import code
class NameSpace(dict):
def __init__(self):
dict.__init__(self)
self.__const = set()
@ -63,6 +64,7 @@ from os import path
class ClientConsole(object):
def __init__(self, cfgname, basepath):
self.namespace = NameSpace()
self.namespace.setconst('help', self.helpCmd)
@ -98,6 +100,7 @@ from secop.protocol.messages import *
class TCPConnection(object):
def __init__(self, connect, port, encoding, framing, **kwds):
self.log = mlzlog.log.getChild('connection', False)
self.encoder = ENCODERS[encoding]()
@ -164,6 +167,7 @@ class TCPConnection(object):
class Client(object):
def __init__(self, opts):
self.log = mlzlog.log.getChild('client', True)
self._cache = dict()

View File

@ -481,9 +481,9 @@ class Client(object):
def syncCommunicate(self, *msg):
res = self._communicate(*msg)
try:
res = self.encode_message(*res)
res = self.encode_message(*res)
except Exception:
res = str(res)
res = str(res)
return res
def ping(self, pingctr=[0]):