summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkytv <killyourtv@i2pmail.org>2015-06-22 22:04:51 +0000
committeranonym <anonym@riseup.net>2015-09-11 23:57:21 +0200
commit5d1857739fa14f6abdc0c78037ff6689f53925c5 (patch)
treedaadaff6a9904d277323faceeeaccb5cd1f90832
parentd133a9b924ef7e4c7c4b04a9dd93d6bf67e7eecf (diff)
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
-rwxr-xr-xfeatures/scripts/otr-bot.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/features/scripts/otr-bot.py b/features/scripts/otr-bot.py
index dad41c6..1296f25 100755
--- a/features/scripts/otr-bot.py
+++ b/features/scripts/otr-bot.py
@@ -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: