Fix Python 2 compatibility
!490 (merged) introduced a regression on Python 2, which is still used in Jenkins based nightly builds.
This MR fixes the issue and introduces a test for the Jenkins specific case.
!490 (merged) introduced a regression on Python 2, which is still used in Jenkins based nightly builds.
This MR fixes the issue and introduces a test for the Jenkins specific case.