Fixed unnecessary code.

Lines 7-8: Removed an unnecessary try/except statement and replaced
it with a much simpler if statement.

Line 25: Merged a comment about an exception into the exception
itself, where it will be much more useful.