Exemplo n.º 1
0
 def _execute(self, work):
     action = work[1]
     if action == OPEN_ACTION: self.open(*work[2:])
     elif action == CLOSE_ACTION: self.close(*work[2:])
     elif action == READ_ACTION: self.read(*work[2:])
     elif action == WRITE_ACTION: self.read(*work[2:])
     else: netius.NotImplemented("Undefined file action '%d'" % action)
Exemplo n.º 2
0
    def execute(self, work):
        type = work[0]
        if not type == TASK_WORK:
            netius.NotImplemented("Cannot execute type '%d'" % type)

        callable, args, kwargs = work[1:]
        callable(*args, **kwargs)
Exemplo n.º 3
0
    def execute(self, work):
        type = work[0]
        if not type == FILE_WORK:
            netius.NotImplemented("Cannot execute type '%d'" % type)

        try:
            self._execute(work)
        except BaseException as exception:
            self.owner.push_event((ERROR_ACTION, exception, work[-1]))
Exemplo n.º 4
0
    def execute(self, work):
        type = work[0]
        if not type == TASK_WORK: netius.NotImplemented(
            "Cannot execute type '%d'" % type
        )

        callable, args, kwargs, callback = work[1:]
        result = callable(*args, **kwargs)
        if callback: callback(result)
Exemplo n.º 5
0
 def execute(self, work):
     type = work[0]
     if type == CALLABLE_WORK: work[1]()
     else: raise netius.NotImplemented("Cannot execute type '%d'" % type)
Exemplo n.º 6
0
 def denotify(self):
     raise netius.NotImplemented("Missing implementation")
Exemplo n.º 7
0
 def key_path(self, domain):
     raise netius.NotImplemented("Missing implementation")
Exemplo n.º 8
0
 def flish(self):
     raise netius.NotImplemented("Missing implementation")
Exemplo n.º 9
0
 def write(self, data):
     raise netius.NotImplemented("Missing implementation")
Exemplo n.º 10
0
 def read(self, size):
     raise netius.NotImplemented("Missing implementation")
Exemplo n.º 11
0
 def seek(self, offset):
     raise netius.NotImplemented("Missing implementation")
Exemplo n.º 12
0
 def close(self):
     raise netius.NotImplemented("Missing implementation")
Exemplo n.º 13
0
 def open(self, mode = "r+b"):
     raise netius.NotImplemented("Missing implementation")
Exemplo n.º 14
0
 def auth(cls, *args, **kwargs):
     raise netius.NotImplemented("Missing implementation")