chat-server.py: Use str.format() rather than the deprecated % operator
utils.py: Exclude subclasses of BaseException