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.
master
Miro Hrončok 2013-01-13 20:57:15 +01:00
parent d90166b04c
commit 629a53ac5c
1 changed files with 2 additions and 2 deletions

View File

@ -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()
main()