Add Python 3 support in contrib.gis

Simple try/except block to support both Python 2 and Python 3.