klippy: Fix check for duplicate objects

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2021-03-05 13:59:20 -05:00
parent ab979a52cf
commit 1950380d6c
1 changed files with 1 additions and 1 deletions

View File

@ -84,7 +84,7 @@ class Printer:
and self.start_args.get('debuginput') is not None):
self.request_exit('error_exit')
def add_object(self, name, obj):
if obj in self.objects:
if name in self.objects:
raise self.config_error(
"Printer object '%s' already created" % (name,))
self.objects[name] = obj