I would do the try/except somewhere else, at the top of this file and put that in a "TIDYLIB" constant. Also that would be nice to put info in the docs about it :)

Otherwise, +1