Exemple #1
0
 def done(self, error, args):
     val = None
     if not error:
         assert len(args) == 2
         error = self.toError(args[0])
         val = toByteArray(args[1])
     done.doneGet(self.token, error, val)
 def done(self, error, args):
     value = None
     if not error:
         assert len(args) == 3
         value = channel.toByteArray(args[0])
         error = self.toError(args[1])
         props = args[2]
     done.doneEvaluate(self.token, error, expressions.Value(value, props))
Exemple #3
0
 def done(self, error, args):
     lost_size = 0
     data = None
     eos = False
     if not error:
         assert len(args) == 4
         data = channel.toByteArray(args[0])
         error = self.toError(args[1])
         lost_size = args[2]
         eos = args[3]
     done.doneRead(self.token, error, lost_size, data, eos)
Exemple #4
0
 def done(self, error, args):
     e = None
     if error:
         e = memory.MemoryError(error.message)
     else:
         assert len(args) == 3
         bytes = channel.toByteArray(args[0])
         assert len(bytes) <= size
         buf[offs:offs+len(bytes)] = bytes
         e = self.toMemoryError(args[1], args[2])
     done.doneMemory(self.token, e)
Exemple #5
0
 def done(self, error, args):
     s = None
     b = None
     eof = False
     if error:
         s = Status(error)
     else:
         assert len(args) == 3
         s = self._toSFError(args[1])
         if not s:
             b = channel.toByteArray(args[0])
             eof = args[2]
     done.doneRead(self.token, s, b, eof)
Exemple #6
0
 def __init__(self, props):
     super(Context, self).__init__(props)
     self.value = channel.toByteArray(props.get(symbols.PROP_VALUE))
Exemple #7
0
 def __init__(self, m):
     desc = m.get("Description")
     name = m.get("Name")
     value = toByteArray(m.get("Value"))
     super(NamedValueInfo, self).__init__(value, name, desc)