Python v2 fixes.
Merge pull request #1904 from mrunalp/dev/python_fixes

Merged by openshift-bot