mirror of
https://git.wownero.com/wownero/tippero.git
synced 2024-08-15 00:33:14 +00:00
reddit: fix parsing of tips-as-replies
"+" was treated a valid number, since all parts were optional
This commit is contained in:
parent
d1d1184f41
commit
903a587209
1 changed files with 4 additions and 3 deletions
|
@ -161,9 +161,10 @@ class RedditNetwork(Network):
|
||||||
author=parent_item.author.name
|
author=parent_item.author.name
|
||||||
match=re.search("\+[0-9]*(\.[0-9]*)?",line)
|
match=re.search("\+[0-9]*(\.[0-9]*)?",line)
|
||||||
amount=match.group(0)
|
amount=match.group(0)
|
||||||
synthetic_cmd=['tip',author,amount.replace('+','')]
|
if amount!='+':
|
||||||
log_log('Running synthetic command: %s' % (str(synthetic_cmd)))
|
synthetic_cmd=['tip',author,amount.replace('+','')]
|
||||||
self.on_command(link,synthetic_cmd)
|
log_log('Running synthetic command: %s' % (str(synthetic_cmd)))
|
||||||
|
self.on_command(link,synthetic_cmd)
|
||||||
except Exception,e:
|
except Exception,e:
|
||||||
log_error('Failed to tip %s\'s parent: %s' % (item.id,str(e)))
|
log_error('Failed to tip %s\'s parent: %s' % (item.id,str(e)))
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in a new issue