Improve Python 3.x compatibility
Improve Python 3.x compatibility

Mechanical translation of deprecated constructs
to 3.x compatible variants.

Change-Id: I4988d0ac656903e0d0320aaa8361d4eeb774a0f9

ttx/oslo.rootwrap,citrix-openstack-build/oslo.rootwrap,varunarya10/oslo.rootwrap