(bug 59970) Python 3 import blocks are now explicit

Instead of try:... except ImportError:..., we now use
if sys.version_info[0] == 2.

Change-Id: Ib4199604b62d8bb276db6d1d3ff592a71a4e5e93