def _tx_real(self, mesg): if self.txtinh is None: raise s_exc.NotReady() data = self.txtinh.enc(s_msgpack.en(mesg)) self.link.tx(('xmit', {'data': data}))
def _tx_real(self, mesg): if self._crypter is None: raise s_exc.NotReady(mesg='Crypter not set') with self._tx_lock: data = self._crypter.encrypt(mesg) self.link.tx(('xmit', {'data': data}))
def __getattr__(self, name): if self._t_methinfo is None: raise s_exc.NotReady(mesg='Must call waitready() on Client before first method call') info = self._t_methinfo.get(name) if info is not None and info.get('genr'): meth = GenrMethod(self, name) setattr(self, name, meth) self._t_named_meths.add(name) return meth meth = Method(self, name) self._t_named_meths.add(name) setattr(self, name, meth) return meth