webhooks: Fix use of deprecated Exception.message attribute (#3781)
Since Python 2.6, the BaseException.message attribute is deprecated (PEP-352[1]) in favor of e.args[0] or str(e). This commit replaces e.message with str(e). [1] https://www.python.org/dev/peps/pep-0352/ Signed-off-by: Maël Kerbiriou <m431.kerbiriou@gmail.com>
This commit is contained in:
@@ -530,7 +530,7 @@ class BedMeshCalibrate:
|
||||
try:
|
||||
z_mesh.build_mesh(probed_matrix)
|
||||
except BedMeshError as e:
|
||||
raise self.gcode.error(e.message)
|
||||
raise self.gcode.error(str(e))
|
||||
self.bedmesh.set_mesh(z_mesh)
|
||||
self.gcode.respond_info("Mesh Bed Leveling Complete")
|
||||
self.bedmesh.save_profile("default")
|
||||
@@ -988,7 +988,7 @@ class ProfileManager:
|
||||
try:
|
||||
z_mesh.build_mesh(probed_matrix)
|
||||
except BedMeshError as e:
|
||||
raise self.gcode.error(e.message)
|
||||
raise self.gcode.error(str(e))
|
||||
self.current_profile = prof_name
|
||||
self.bedmesh.set_mesh(z_mesh)
|
||||
def remove_profile(self, prof_name):
|
||||
|
||||
Reference in New Issue
Block a user