Browse Source

Added **kwargs option to request write

CURA-3496
Jaime van Kessel 8 years ago
parent
commit
7993d9e95e

+ 2 - 1
plugins/RemovableDriveOutputDevice/RemovableDriveOutputDevice.py

@@ -37,7 +37,8 @@ class RemovableDriveOutputDevice(OutputDevice):
     #   meshes.
     #   \param limit_mimetypes Should we limit the available MIME types to the
     #   MIME types available to the currently active machine?
-    def requestWrite(self, nodes, file_name = None, filter_by_machine = False, file_handler = None):
+    #
+    def requestWrite(self, nodes, file_name = None, filter_by_machine = False, file_handler = None, **kwargs):
         filter_by_machine = True # This plugin is indended to be used by machine (regardless of what it was told to do)
         if self._writing:
             raise OutputDeviceError.DeviceBusyError()

+ 2 - 1
plugins/UM3NetworkPrinting/NetworkPrinterOutputDevice.py

@@ -601,7 +601,8 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice):
     #   This is ignored.
     #   \param filter_by_machine Whether to filter MIME types by machine. This
     #   is ignored.
-    def requestWrite(self, nodes, file_name = None, filter_by_machine = False, file_handler = None):
+    #   \param kwargs Keyword arguments.
+    def requestWrite(self, nodes, file_name = None, filter_by_machine = False, file_handler = None, **kwargs):
         if self._printer_state != "idle":
             self._error_message = Message(
                 i18n_catalog.i18nc("@info:status", "Unable to start a new print job, printer is busy. Current printer status is %s.") % self._printer_state)

+ 2 - 1
plugins/USBPrinting/USBPrinterOutputDevice.py

@@ -443,7 +443,8 @@ class USBPrinterOutputDevice(PrinterOutputDevice):
     #   This is ignored.
     #   \param filter_by_machine Whether to filter MIME types by machine. This
     #   is ignored.
-    def requestWrite(self, nodes, file_name = None, filter_by_machine = False, file_handler = None):
+    #   \param kwargs Keyword arguments.
+    def requestWrite(self, nodes, file_name = None, filter_by_machine = False, file_handler = None, **kwargs):
         container_stack = Application.getInstance().getGlobalContainerStack()
 
         if container_stack.getProperty("machine_gcode_flavor", "value") == "UltiGCode":