diff --git a/klippy/klippy.py b/klippy/klippy.py index e2c580bc..327af461 100644 --- a/klippy/klippy.py +++ b/klippy/klippy.py @@ -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