foosel/OctoPrint — pull request #378 by rosenhouse (2014-02-15 05:15:40+00:00)
Title: fix crash when getStartTime() returns None

In testing the `devel` branch with a short (<100 line) gcode file, I was hitting a crash that looked like this

```
2014-02-15 04:12:11,400 - octoprint.util.comm - ERROR - Something crashed inside the serial connection loop, please report this in OctoPrint's bug tracker:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/OctoPrint-1.1.0_dev-py2.7.egg/octoprint/util/comm.py", line 829, in _monitor
self._sendNext()
File "/usr/local/lib/python2.7/dist-packages/OctoPrint-1.1.0_dev-py2.7.egg/octoprint/util/comm.py", line 950, in _sendNext
"time": time.time() - self._currentFile.getStartTime()
TypeError: unsupported operand type(s) for -: 'float' and 'NoneType'
```

This commit fixes the crash for me.