Commit 629a53ac authored by Miro Hrončok's avatar Miro Hrončok

gcoder.py reads only hte content of the file

Previously, gcoder.py read not only the content of the file, but also it's
filename. This could have led to unexpected exceptions.
parent d90166b0
......@@ -210,7 +210,7 @@ def main():
print "usage: %s filename.gcode" % sys.argv[0]
return
gcode = GCode(sys.argv[1])
gcode = GCode(list(open(sys.argv[1])))
gcode.measure()
......@@ -221,4 +221,4 @@ def main():
print "Filament used: %0.02fmm" % gcode.filament_length()
if __name__ == '__main__':
main()
\ No newline at end of file
main()
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