From 5d1c2f885d231ae9a24b40048dcbee0adcc2be5a Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Thu, 15 Mar 2018 19:05:10 -0700 Subject: [PATCH] When logging in, reassign the common.r instance. --- timesearch/commentaugment.py | 2 +- timesearch/livestream.py | 2 +- timesearch/timesearch.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/timesearch/commentaugment.py b/timesearch/commentaugment.py index 16ca05a..63eec44 100644 --- a/timesearch/commentaugment.py +++ b/timesearch/commentaugment.py @@ -21,7 +21,7 @@ def commentaugment( if not common.is_xor(subreddit, username): raise exceptions.NotExclusive(['subreddit', 'username']) - common.bot.login(common.r) + common.r = common.bot.login(common.r) if specific_submission is not None: if not specific_submission.startswith('t3_'): specific_submission = 't3_' + specific_submission diff --git a/timesearch/livestream.py b/timesearch/livestream.py index e407d68..c5e2ab9 100644 --- a/timesearch/livestream.py +++ b/timesearch/livestream.py @@ -84,7 +84,7 @@ def _livestream_as_a_generator( if not any([do_submissions, do_comments]): raise TypeError('Required do_submissions and/or do_comments parameter') - common.bot.login(common.r) + common.r = common.bot.login(common.r) if subreddit: common.log.debug('Getting subreddit %s', subreddit) diff --git a/timesearch/timesearch.py b/timesearch/timesearch.py index 23736bc..beb05ed 100644 --- a/timesearch/timesearch.py +++ b/timesearch/timesearch.py @@ -25,7 +25,7 @@ def timesearch( if not common.is_xor(subreddit, username): raise exceptions.NotExclusive(['subreddit', 'username']) - common.bot.login(common.r) + common.r = common.bot.login(common.r) if subreddit: (database, subreddit) = tsdb.TSDB.for_subreddit(subreddit, fix_name=True)