From 9a83b741eaf70cdf17bad471de126d36bbc3d0d0 Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Wed, 27 Nov 2013 16:43:42 +0000 Subject: [PATCH] Socket: Only display the missing cert file warning if a cert file path is given. --- src/drivers/Socket.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/drivers/Socket.py b/src/drivers/Socket.py index 47955ea17..bb5b2dc54 100644 --- a/src/drivers/Socket.py +++ b/src/drivers/Socket.py @@ -306,7 +306,9 @@ class SocketDriver(drivers.IrcDriver, drivers.ServersMixin): assert globals().has_key('ssl') certfile = getattr(conf.supybot.networks, self.irc.network) \ .certfile() - if not certfile or not os.path.isfile(certfile): + if not certfile: + certfile = None + elif not os.path.isfile(certfile): drivers.log.warning('Could not find cert file %s.' % certfile) certfile = None