workaround for python bug issue15881
Merge pull request #156 from peterbe/workaround-for-python-bug-issue15881

workaround for python bug issue15881