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)
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)
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]))
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)
def execute(self, work): type = work[0] if type == CALLABLE_WORK: work[1]() else: raise netius.NotImplemented("Cannot execute type '%d'" % type)
def denotify(self): raise netius.NotImplemented("Missing implementation")
def key_path(self, domain): raise netius.NotImplemented("Missing implementation")
def flish(self): raise netius.NotImplemented("Missing implementation")
def write(self, data): raise netius.NotImplemented("Missing implementation")
def read(self, size): raise netius.NotImplemented("Missing implementation")
def seek(self, offset): raise netius.NotImplemented("Missing implementation")
def close(self): raise netius.NotImplemented("Missing implementation")
def open(self, mode = "r+b"): raise netius.NotImplemented("Missing implementation")
def auth(cls, *args, **kwargs): raise netius.NotImplemented("Missing implementation")