daemon: Trivial debug message cleanup.

Check that a message header was received before trying to log it.
This commit is contained in:
tgoff0 2015-01-21 21:37:48 +00:00
parent 29c31aad9a
commit dfc4b2b9a2

View file

@ -203,7 +203,7 @@ class CoreRequestHandler(SocketServer.BaseRequestHandler):
'''
try:
msghdr = self.request.recv(coreapi.CoreMessage.hdrsiz)
if self.debug:
if self.debug and len(msghdr) > 0:
self.info("received message header:\n%s" % hexdump(msghdr))
except Exception, e:
raise IOError, "error receiving header (%s)" % e