py2 compat fix, attempt to track down travis-only testcase fail