Do not return anything for python 2
Refactor previous commit