Fixed a python 3.2 syntax error and python 3 warning introduced by 054ce2aa02.