From 184476409c426032c1ad521d05af48b70624641f Mon Sep 17 00:00:00 2001 From: moneromooo Date: Mon, 9 Feb 2015 20:02:26 +0000 Subject: [PATCH] reddit: ignore authorless messages --- tipbot/modules/reddit.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tipbot/modules/reddit.py b/tipbot/modules/reddit.py index 155071a..87af504 100644 --- a/tipbot/modules/reddit.py +++ b/tipbot/modules/reddit.py @@ -99,7 +99,9 @@ class RedditNetwork(Network): return False def _parse(self,item,is_pm): - author=self.canonicalize(item.author.name) if hasattr(item,'author') else None + if not hasattr(item,'author'): + return + author=self.canonicalize(item.author.name) if author==self.canonicalize(self.login): return