The file sloc2html.py proposed on http://www.dwheeler.com/sloccount/sloc2html.py
has had some difficulties in processing the results of sloccount and especially hanged on some blank lines adn stuff like that.
I propose here a little patch that is certainly more like a quick fix than a real solution (it seems to work though).
I'll also post the file itself as it is quite lean anyway.
Note: the patch and file proposed here also takes into account bug id#1767314.