Commit 5d185773 authored by kytv's avatar kytv Committed by anonym
Browse files

Import logging module in otr-bot.py

Our otr-bot.py does not use logging but the jabberbot library makes
logging calls,  causing a one-off message “No handlers could be found
for logger "jabberbot"” to be printed to the console. This commit
effectively prevents logging/outputting anything to the terminal which
is at a level lower than CRITICAL.

Will-fix: 9375
parent d133a9b9
......@@ -3,6 +3,7 @@ import sys
import jabberbot
import xmpp
import potr
import logging
from argparse import ArgumentParser
class OtrContext(potr.context.Context):
......@@ -71,6 +72,7 @@ class OtrBot(jabberbot.JabberBot):
# completely (copy-paste mostly) in order to add support for using
# an XMPP "Connect Server".
def connect(self):
logging.basicConfig(level=logging.CRITICAL)
if not self.conn:
conn = xmpp.Client(self.jid.getDomain(), debug=[])
if self.__connect_server:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment