mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2025-07-18 14:06:07 -04:00
Adding log information to events
This commit is contained in:
@@ -13,6 +13,10 @@ class timelinesStreamer(TwythonStreamer):
|
||||
def on_error(self, status_code, data):
|
||||
log.debug("%s: %s" % (status_code, data))
|
||||
|
||||
def on_timeout(self, *args, **kwargs):
|
||||
log.debug("Twitter timeout Error")
|
||||
pub.sendMessage("stream-error")
|
||||
|
||||
def check_tls(self, data):
|
||||
for i in self.session.settings["other_buffers"]["timelines"]:
|
||||
if data["user"]["screen_name"] == i:
|
||||
|
@@ -12,6 +12,10 @@ class streamer(TwythonStreamer):
|
||||
self.muted_users = self.session.db["muted_users"]
|
||||
# self.blocked_users = []
|
||||
|
||||
def on_timeout(self, *args, **kwargs):
|
||||
log.debug("Twitter timeout Error")
|
||||
pub.sendMessage("stream-error")
|
||||
|
||||
def on_error(self, status_code, data):
|
||||
log.debug("Error %s: %s" % (status_code, data))
|
||||
|
||||
|
@@ -97,5 +97,7 @@ def is_allowed(tweet):
|
||||
if tweet.has_key("retweeted_status"): tweet = tweet["retweeted_status"]
|
||||
source = re.sub(r"(?s)<.*?>", "", tweet["source"])
|
||||
for i in config.main["twitter"]["ignored_clients"]:
|
||||
if i.lower() == source.lower(): allowed = False
|
||||
if i.lower() == source.lower():
|
||||
allowed = False
|
||||
log.exception("Tuit not allowed: %s" % (tweet["text"],))
|
||||
return allowed
|
Reference in New Issue
Block a user