From 1950380d6c90e57f6fa844f886d208e5391ede7b Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Fri, 5 Mar 2021 13:59:20 -0500 Subject: [PATCH] klippy: Fix check for duplicate objects Signed-off-by: Kevin O'Connor --- klippy/klippy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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