Fix exception handling in server.py

Didn't keep up with Algorithm changes.
Merge pull request #272 from gittip/fix-server

Fix exception handling in server.py