mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-08 23:46:22 -06:00
Some defenses against possible None values
This commit is contained in:
parent
bd4c4b1f1d
commit
91ac7dbc24
2 changed files with 6 additions and 1 deletions
|
@ -195,7 +195,7 @@ class UltimakerNetworkedPrinterOutputDevice(NetworkedPrinterOutputDevice):
|
|||
|
||||
# Check which printers need to be created or updated.
|
||||
for index, printer_data in enumerate(remote_printers):
|
||||
printer = next(iter(printer for printer in self._printers if printer.key == printer_data.uuid), None)
|
||||
printer = next(iter(printer for printer in self._printers if printer.key == printer_data.uuid))
|
||||
if not printer:
|
||||
printer = printer_data.createOutputModel(ClusterOutputController(self))
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue