From dd280f963fd8ef0ccce44e0509953001e4744a1a Mon Sep 17 00:00:00 2001 From: Boomaa23 Date: Wed, 9 Mar 2022 03:50:27 -0800 Subject: [PATCH] Fix mod-printer pre-commit style --- staff/lab/mod-printer | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/staff/lab/mod-printer b/staff/lab/mod-printer index dd52672..0be807f 100755 --- a/staff/lab/mod-printer +++ b/staff/lab/mod-printer @@ -74,7 +74,7 @@ def list_printers(args): # Find differences between all printers and assigned printers assigned_printers = [] - matches_args = lambda name: (not args.printer or args.printer in name) \ + def matches_args(name): return (not args.printer or args.printer in name) \ and (not args.classname or args.classname in name) for class_name, class_members in cups_classes.items(): class_members = [name for name in class_members if matches_args(name)] @@ -147,7 +147,7 @@ def parse_cups_classes(lpstat_raw, args): print('Overriding CUPS classes with parameter: %s' % args.classname) else: raise CUPSException('ERROR: Specified class %s could not be found in available classes %s' - % (args.classname, cups_classes)) + % (args.classname, cups_classes)) return cups_classes