Update socks.py

This should make the changes so that socks.py will work in python 2.7.5