]> granicus.if.org Git - python/commitdiff
Fixed bug in DatagramHandler.send()
authorVinay Sajip <vinay_sajip@yahoo.co.uk>
Tue, 24 Aug 2004 09:36:23 +0000 (09:36 +0000)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>
Tue, 24 Aug 2004 09:36:23 +0000 (09:36 +0000)
Lib/logging/handlers.py

index 2cb1fb07c332204643ccebef7ee4a593eff9611a..559404fd10c664fa3e34d01a70fbdfdcfe88ec3e 100644 (file)
@@ -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):