add self param to error_hook + update documentation
This commit is contained in:
1 parent
efa556a812
commit
c30380d423
2 files changed
+75
-1
No files matched your search
@@ -648,7 +648,14 @@ class Printer(PrinterInterface, comm.MachineComPrintCallback):
|
||||
def get_sd_files(self, *args, **kwargs):
|
||||
if self._comm is None or not self._comm.isSdReady():
|
||||
return []
|
||||
return map(lambda x: (x[0][1:], x[1]), self._comm.getSdFiles())
|
||||
return list(map(lambda x: (x[0][1:], x[1]), self._comm.getSdFiles()))
|
||||
|
||||
def success_hook_sdcopy(self, payload):
|
||||
self.on_comm_file_transfer_done(payload["remote"])
|
||||
eventManager().fire(Events.TRANSFER_DONE, payload)
|
||||
|
||||
def error_hook_sdcopy(self, payload):
|
||||
eventManager().fire(Events.TRANSFER_FAILED, payload)
|
||||
|
||||
def add_sd_file(self, filename, absolutePath, on_success=None, on_failure=None, *args, **kwargs):
|
||||
if not self._comm or self._comm.isBusy() or not self._comm.isSdReady():
|
||||
|
||||
Reference in new issue
Block a user