Commit 9615e7bc authored by Kliment Yanev's avatar Kliment Yanev

Do not try to update total filament used if no gcode is loaded. Fixes #731

parent ace66376
...@@ -1187,8 +1187,9 @@ class pronsole(cmd.Cmd): ...@@ -1187,8 +1187,9 @@ class pronsole(cmd.Cmd):
"duration": format_duration(print_duration)}) "duration": format_duration(print_duration)})
# Update total filament length used # Update total filament length used
new_total = self.settings.total_filament_used + self.fgcode.filament_length if self.fgcode is not None:
self.set("total_filament_used", new_total) new_total = self.settings.total_filament_used + self.fgcode.filament_length
self.set("total_filament_used", new_total)
if not self.settings.final_command: if not self.settings.final_command:
return return
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment