server.py: add signal handler [to be merged with previous]
server.py: avoid access to nonexistent STATE attribute

Spotted using pylint.