[generic] Fix access to removed function in python 3.4