Update server.py

Added a try-except to solve the error with the empty defBuffer not converting to 0.
Merge pull request #2 from PhilippHagenlocher/master

Update server.py