Merge branch '3.3'

This commit is contained in:
ChrisTerBeke 2018-05-24 14:33:55 +02:00
commit fd2e692440

View file

@ -73,10 +73,11 @@ class USBPrinterOutputDeviceManager(QObject, OutputDevicePlugin):
if container_stack is None: if container_stack is None:
time.sleep(5) time.sleep(5)
continue continue
port_list = [] # Just an empty list; all USB devices will be removed.
if container_stack.getMetaDataEntry("supports_usb_connection"): if container_stack.getMetaDataEntry("supports_usb_connection"):
port_list = self.getSerialPortList(only_list_usb=True) machine_file_formats = [file_type.strip() for file_type in container_stack.getMetaDataEntry("file_formats").split(";")]
else: if "text/x-gcode" in machine_file_formats:
port_list = [] # Just use an empty list; all USB devices will be removed. port_list = self.getSerialPortList(only_list_usb=True)
self._addRemovePorts(port_list) self._addRemovePorts(port_list)
time.sleep(5) time.sleep(5)