Commit 00b59de9 authored by Guillaume Seguin's avatar Guillaume Seguin

Start using logging module to report errors

parent 79d59e80
...@@ -18,6 +18,7 @@ import sys ...@@ -18,6 +18,7 @@ import sys
import re import re
import math import math
import datetime import datetime
import logging
from array import array from array import array
gcode_parsed_args = ["x", "y", "e", "f", "z", "i", "j"] gcode_parsed_args = ["x", "y", "e", "f", "z", "i", "j"]
...@@ -66,7 +67,7 @@ def split(line): ...@@ -66,7 +67,7 @@ def split(line):
if not split_raw: if not split_raw:
line.command = line.raw line.command = line.raw
line.is_move = False line.is_move = False
print "Warning: raw line \"%s\" could not be parsed" % line.raw logging.warning("raw G-Code line \"%s\" could not be parsed" % line.raw)
return line.raw return line.raw
command = split_raw[0] if split_raw[0][0] != "n" else split_raw[1] command = split_raw[0] if split_raw[0][0] != "n" else split_raw[1]
line.command = command[0].upper() + command[1] line.command = command[0].upper() + command[1]
......
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