python27: fix http://bugs.python.org/issue19561
Merge pull request #721 from pyhalov/python27

python27: fix http://bugs.python.org/issue19561