Added the check for python 2.7