diff options
author | jwansek <eddie.atten.ea29@gmail.com> | 2020-03-31 10:56:57 +0000 |
---|---|---|
committer | jwansek <eddie.atten.ea29@gmail.com> | 2020-03-31 10:56:57 +0000 |
commit | cf2ff07bd3d3825a901bec5ef7e23a4b38d440d2 (patch) | |
tree | c7dedfef0146f857bb915efb00ccdfab60341414 /subreddit.py | |
parent | 3dc0d42799b81437409788fdc08cfa03aa98b49d (diff) | |
download | SmallYTChannelBot-cf2ff07bd3d3825a901bec5ef7e23a4b38d440d2.tar.gz SmallYTChannelBot-cf2ff07bd3d3825a901bec5ef7e23a4b38d440d2.zip |
fixed bug with updating flair, updated db and log
Diffstat (limited to 'subreddit.py')
-rwxr-xr-x | subreddit.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/subreddit.py b/subreddit.py index fc13cb1..3743a8d 100755 --- a/subreddit.py +++ b/subreddit.py @@ -46,10 +46,10 @@ def update_users_flair_from_comment(comment): def update_users_flair(username): flairtext = next(SUBREDDIT.flair(redditor=username))["flair_text"] - flairscore = get_lambda_from_flair(flairtext) if flairtext is None: flairtext = "" else: + flairscore = get_lambda_from_flair(flairtext) flairtext = str(flairtext.replace("[%s] " % flairscore, "")) if username in get_mods(): newflair = "[∞λ] %s" % (flairtext) @@ -280,7 +280,7 @@ Views|%s except: pass - update_users_flair_from_comment(submission) + update_users_flair(str(submission.author)) return text def main(): |