MCPcopy Create free account
hub / github.com/AstroPrint/AstroBox / printerModels

Method printerModels

src/astroprint/plugin/services/system.py:254–268  ·  view source on GitHub ↗
(self, data, sendMessage)

Source from the content-addressed store, hash-verified

252 sendMessage("invalid_params",True)
253
254 def printerModels(self, data, sendMessage):
255 if "manufacturer_id" in data:
256 try:
257 printerModels = astroprintCloud().printerModels(data['manufacturer_id'])
258
259 if 'error' in printerModels:
260 sendMessage("error_getting_printer_models",True)
261 else:
262 sendMessage( printerModels )
263
264 except Exception:
265 self._logger.error('There was and error getting printer models', exc_info = True)
266 sendMessage("error_getting_printer_models",True)
267 else:
268 sendMessage("invalid_params",True)
269
270 def printingInfo(self, data, sendMessage):
271 pm = printerManager()

Callers 1

printerModelsFunction · 0.45

Calls 2

astroprintCloudFunction · 0.90
errorMethod · 0.45

Tested by

no test coverage detected