menu: Don't peek into printer.objects member variable
Use the printer.lookup_objects() method to get the list of available printer objects. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
33f5b5f285
commit
bf647749dd
|
@ -1049,9 +1049,7 @@ class MenuManager:
|
|||
|
||||
def handle_ready(self):
|
||||
# Load all available printer objects
|
||||
for cfg_name in self.printer.objects:
|
||||
obj = self.printer.lookup_object(cfg_name, None)
|
||||
if obj is not None:
|
||||
for cfg_name, obj in self.printer.lookup_objects():
|
||||
name = ".".join(str(cfg_name).split())
|
||||
self.objs[name] = obj
|
||||
logging.debug("Load module '%s' -> %s" % (
|
||||
|
|
Loading…
Reference in New Issue