mirror of
https://github.com/wownero/tippero.git
synced 2026-10-17 15:51:33 +02:00
reddit: guard against missing is_root field
This commit is contained in:
@@ -142,7 +142,8 @@ class RedditNetwork(Network):
|
||||
|
||||
else:
|
||||
# reddit special: +x as a reply means tip
|
||||
if not is_pm and not item.is_root and hasattr(item,'parent_id'):
|
||||
# if is_root is not here, consider the item as a reply, but check parent_id
|
||||
if not is_pm and (not hasattr(item,'is_root') or not item.is_root) and hasattr(item,'parent_id'):
|
||||
line=line.replace(self.keyword,'').strip()
|
||||
if re.match("\+[0-9]*\.[0-9]*",line):
|
||||
if self.on_command:
|
||||
|
||||
Reference in New Issue
Block a user