From 02d9f5196c073c9247efb98cef1082cf71ed3700 Mon Sep 17 00:00:00 2001 From: Lorenz Diener Date: Tue, 5 Sep 2017 16:19:27 +0200 Subject: Fix fetch_* methods modifying their parameters --- mastodon/Mastodon.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'mastodon') diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py index 4012945..13373d1 100644 --- a/mastodon/Mastodon.py +++ b/mastodon/Mastodon.py @@ -758,11 +758,11 @@ class Mastodon: """ if isinstance(previous_page, list): if '_pagination_next' in previous_page[-1]: - params = previous_page[-1]['_pagination_next'] + params = copy.deepcopy(previous_page[-1]['_pagination_next']) else: return None else: - params = previous_page + params = copy.deepcopy(previous_page) method = params['_pagination_method'] del params['_pagination_method'] @@ -782,11 +782,11 @@ class Mastodon: """ if isinstance(next_page, list): if '_pagination_prev' in next_page[-1]: - params = next_page[-1]['_pagination_prev'] + params = copy.deepcopy(next_page[-1]['_pagination_prev']) else: return None else: - params = next_page + params = copy.deepcopy(next_page) method = params['_pagination_method'] del params['_pagination_method'] -- cgit v1.2.3