From: Vinay Sajip Date: Tue, 24 Aug 2004 09:36:23 +0000 (+0000) Subject: Fixed bug in DatagramHandler.send() X-Git-Tag: v2.4a3~137 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fb154171c4ace44dec817a3e52a0b83bbbb0f4f5;p=python Fixed bug in DatagramHandler.send() --- diff --git a/Lib/logging/handlers.py b/Lib/logging/handlers.py index 2cb1fb07c3..559404fd10 100644 --- a/Lib/logging/handlers.py +++ b/Lib/logging/handlers.py @@ -450,6 +450,8 @@ class DatagramHandler(SocketHandler): when the network is busy - UDP does not guarantee delivery and can deliver packets out of sequence. """ + if self.sock is None: + self.createSocket() self.sock.sendto(s, (self.host, self.port)) class SysLogHandler(logging.Handler):