a python2 daemon class