diff options
author | Maël Kerbiriou <m431.kerbiriou@gmail.com> | 2021-01-18 04:37:41 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-17 22:37:41 -0500 |
commit | 9278f56e3685a71eea6f2ae393a7e4f32b048420 (patch) | |
tree | 0740d1414c500ef22c7619b764a81605ef898a19 /klippy/extras/bed_mesh.py | |
parent | 64097cb0d0e0a1e2a73f6846b48bae9b509204f1 (diff) | |
download | kutter-9278f56e3685a71eea6f2ae393a7e4f32b048420.tar.gz kutter-9278f56e3685a71eea6f2ae393a7e4f32b048420.tar.xz kutter-9278f56e3685a71eea6f2ae393a7e4f32b048420.zip |
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>
Diffstat (limited to 'klippy/extras/bed_mesh.py')
-rw-r--r-- | klippy/extras/bed_mesh.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/klippy/extras/bed_mesh.py b/klippy/extras/bed_mesh.py index 7afec299..e78ebaeb 100644 --- a/klippy/extras/bed_mesh.py +++ b/klippy/extras/bed_mesh.py @@ -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): |