aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLorenz Diener <[email protected]>2017-09-05 16:19:27 +0200
committerLorenz Diener <[email protected]>2017-09-05 16:19:27 +0200
commit02d9f5196c073c9247efb98cef1082cf71ed3700 (patch)
treeb61bd4eb49af9adabc4e4009726e0374ec9af697
parent75ffe55cb7f1bb33b6831ab1944e9762c01d6a34 (diff)
downloadmastodon.py-02d9f5196c073c9247efb98cef1082cf71ed3700.tar.gz
Fix fetch_* methods modifying their parameters
-rw-r--r--mastodon/Mastodon.py8
1 files changed, 4 insertions, 4 deletions
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:
758 """ 758 """
759 if isinstance(previous_page, list): 759 if isinstance(previous_page, list):
760 if '_pagination_next' in previous_page[-1]: 760 if '_pagination_next' in previous_page[-1]:
761 params = previous_page[-1]['_pagination_next'] 761 params = copy.deepcopy(previous_page[-1]['_pagination_next'])
762 else: 762 else:
763 return None 763 return None
764 else: 764 else:
765 params = previous_page 765 params = copy.deepcopy(previous_page)
766 766
767 method = params['_pagination_method'] 767 method = params['_pagination_method']
768 del params['_pagination_method'] 768 del params['_pagination_method']
@@ -782,11 +782,11 @@ class Mastodon:
782 """ 782 """
783 if isinstance(next_page, list): 783 if isinstance(next_page, list):
784 if '_pagination_prev' in next_page[-1]: 784 if '_pagination_prev' in next_page[-1]:
785 params = next_page[-1]['_pagination_prev'] 785 params = copy.deepcopy(next_page[-1]['_pagination_prev'])
786 else: 786 else:
787 return None 787 return None
788 else: 788 else:
789 params = next_page 789 params = copy.deepcopy(next_page)
790 790
791 method = params['_pagination_method'] 791 method = params['_pagination_method']
792 del params['_pagination_method'] 792 del params['_pagination_method']
Powered by cgit v1.2.3 (git 2.41.0)