Making horizon.d compatible with python2.7