Fix an `except` for Py3

It appears to have been introduced with the merge of PR #28 and I guess PR #26 was created before this and didn't handle it.

Cc: @linsomniac, @cabrera