process_utils: fixes for Python3 support