bed_mesh: Fix some fragile identity comparisons

Signed-off-by: Lucas Fink <software@lfcode.ca>
This commit is contained in:
Lucas Fink 2018-10-28 21:11:05 -06:00 committed by KevinOConnor
parent 3da7697c66
commit f6c2e8b4eb
1 changed files with 2 additions and 2 deletions

View File

@ -211,7 +211,7 @@ class BedMeshCalibrate:
stored_profs = config.get_prefix_sections(self.name)
# Remove primary bed_mesh section, as it is not a stored profile
stored_profs = [s for s in stored_profs
if s.get_name() is not self.name]
if s.get_name() != self.name]
for profile in stored_profs:
name = profile.get_name().split(' ', 1)[1]
self.profiles[name] = {}
@ -292,7 +292,7 @@ class BedMeshCalibrate:
for key in options:
name = self.gcode.get_str(key, params, None)
if name is not None:
if name == "default" and key is not 'LOAD':
if name == "default" and key != 'LOAD':
self.gcode.respond_info(
"Profile 'default' is reserved, please chose"
" another profile name.")