aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras/safe_z_home.py
diff options
context:
space:
mode:
Diffstat (limited to 'klippy/extras/safe_z_home.py')
-rw-r--r--klippy/extras/safe_z_home.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/klippy/extras/safe_z_home.py b/klippy/extras/safe_z_home.py
index c2f98866..93536274 100644
--- a/klippy/extras/safe_z_home.py
+++ b/klippy/extras/safe_z_home.py
@@ -8,16 +8,16 @@ class SafeZHoming:
def __init__(self, config):
self.printer = config.get_printer()
try:
- x_pos, y_pos = config.get("home_xy_position",
- default=",").split(',')
+ x_pos, y_pos = config.get("home_xy_position").split(',')
self.home_x_pos, self.home_y_pos = float(x_pos), float(y_pos)
except:
- raise config.error("Unable to parse home_xy_position in %s" % (
- config.get_name()))
+ raise config.error("Unable to parse home_xy_position in %s"
+ % (config.get_name(),))
self.z_hop = config.getfloat("z_hop", default=0.0)
self.z_hop_speed = config.getfloat('z_hop_speed', 15., above=0.)
- self.max_z = config.getsection('stepper_z').getfloat('position_max')
+ zconfig = config.getsection('stepper_z')
+ self.max_z = zconfig.getfloat('position_max', note_valid=False)
self.speed = config.getfloat('speed', 50.0, above=0.)
self.move_to_previous = config.getboolean('move_to_previous', False)
self.printer.load_object(config, 'gcode_move')