Socket wait() assertion fix for Python 2.6