ctype.py: fail gracefully if the request failed.
Merge pull request #12 from rene0/master

ctype.py: fail gracefully if the request failed.