fix to work with earlier versions of python

Benjamin Mako Hill || Want to submit a patch?