Some list improvements

This commit is contained in:
Manuel Cortez 2015-11-27 09:17:14 -06:00
parent 45f663a462
commit b4eb11a6de
2 changed files with 4 additions and 3 deletions

View File

@ -369,8 +369,9 @@ class Session(object):
def remove_stream(self, stream): def remove_stream(self, stream):
if stream == "timelinesStream": if stream == "timelinesStream":
self.timelinesStream.disconnect() if hasattr(self, "timelinesStream"):
del self.timelinesStream self.timelinesStream.disconnect()
del self.timelinesStream
else: else:
self.main_stream.disconnect() self.main_stream.disconnect()
del self.main_stream del self.main_stream

View File

@ -46,7 +46,7 @@ class timelinesStreamer(TwythonStreamer):
try: try:
i.users.index(data["user"]["id"]) i.users.index(data["user"]["id"])
usr = data["in_reply_to_user_id"] usr = data["in_reply_to_user_id"]
if (usr != None or usr in self.friends) or data.has_key("retweeted_status"): if (usr != None and usr in self.friends) or data.has_key("retweeted_status"):
data = self.session.check_quoted_status(data) data = self.session.check_quoted_status(data)
if self.session.settings["general"]["reverse_timelines"] == False: self.session.db["%s" % (i.name,)].append(data) if self.session.settings["general"]["reverse_timelines"] == False: self.session.db["%s" % (i.name,)].append(data)
else: self.session.db["%s" % (i.name,)].insert(0, data) else: self.session.db["%s" % (i.name,)].insert(0, data)