It's hard to tell from the merge request but it looks like you might have an indentation problem here.  It looks fine here however:

https://github.com/guidow/pyfarm-master/blob/55ec8a88aa99966070a408dbbc8618d3ac632992/pyfarm/master/api/agents.py

I haven't pull this down myself yet but just make sure you're using 4-space indentation instead of two spaces or tabs.