From 902e90147a197123ef2f694c7a75a1ed954040c4 Mon Sep 17 00:00:00 2001 From: PidgeyL Date: Mon, 30 May 2016 14:26:27 +0200 Subject: [PATCH] remove unneeded print if not debug --- fbchat/__init__.py | 2 +- fbchat/client.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fbchat/__init__.py b/fbchat/__init__.py index 5316c78..6c73aee 100644 --- a/fbchat/__init__.py +++ b/fbchat/__init__.py @@ -15,7 +15,7 @@ from .client import * __copyright__ = 'Copyright 2015 by Taehoon Kim' -__version__ = '0.3.1' +__version__ = '0.4.0' __license__ = 'BSD' __author__ = 'Taehoon Kim; Moreels Pieter-Jan' __email__ = 'carpedm20@gmail.com' diff --git a/fbchat/client.py b/fbchat/client.py index 6576f87..b11c5d8 100644 --- a/fbchat/client.py +++ b/fbchat/client.py @@ -449,9 +449,9 @@ class Client(object): fbid = m['delta']['messageMetadata']['threadKey']['otherUserFbId'] name = None self.on_message(mid, fbid, name, message, m) - else: - print(m) + if self.debug: + print(m) except Exception as e: self.on_message_error(e, m)