Commit 74896972 authored by Denis Bilenko's avatar Denis Bilenko

server: print server's string representation after the traceback

parent 2acb2550
......@@ -128,8 +128,10 @@ class StreamServer(BaseServer):
sys.stderr.write('ERROR: %s failed with %s\n' % (self, str(ex) or repr(ex)))
return
try:
if address is not None:
sys.stderr.write('Failed to handle request from %s\n' % (address, ))
if address is None:
sys.stderr.write('%s: Failed.\n' % (self, ))
else:
sys.stderr.write('%s: Failed to handle request from %s\n' % (self, address, ))
except Exception:
traceback.print_exc()
if self.delay >= 0:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment