python3 support.

Simple 2to3 run with minor formatting change.

Signed-off-by: Evan McClain <aeroevan@gmail.com>