Socket: Only display the missing cert file warning if a cert file path is given.

This commit is contained in:
Valentin Lorentz 2013-11-27 16:43:42 +00:00
parent ddbadcafff
commit 9a83b741ea

View File

@ -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