aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLorenz Diener <[email protected]>2017-09-08 16:40:43 +0200
committerLorenz Diener <[email protected]>2017-09-08 16:40:43 +0200
commit419bedc55a0d573ab5dbaba3fb48a17c4d21fb1b (patch)
treebf6fb9630c470c2c62dc8fe78341737d5e3e0eec
parenta93a1abcd38798833f4c9ac4c1deaeb7f9a51967 (diff)
downloadmastodon.py-419bedc55a0d573ab5dbaba3fb48a17c4d21fb1b.tar.gz
Potential fix for #81
-rw-r--r--mastodon/Mastodon.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py
index 1e1d90e..4774761 100644
--- a/mastodon/Mastodon.py
+++ b/mastodon/Mastodon.py
@@ -829,7 +829,7 @@ class Mastodon:
829 829
830 Returns the next page or None if no further data is available. 830 Returns the next page or None if no further data is available.
831 """ 831 """
832 if isinstance(previous_page, list): 832 if isinstance(previous_page, list) and len(previous_page) != 0:
833 if '_pagination_next' in previous_page[-1]: 833 if '_pagination_next' in previous_page[-1]:
834 params = copy.deepcopy(previous_page[-1]['_pagination_next']) 834 params = copy.deepcopy(previous_page[-1]['_pagination_next'])
835 else: 835 else:
@@ -853,7 +853,7 @@ class Mastodon:
853 853
854 Returns the previous page or None if no further data is available. 854 Returns the previous page or None if no further data is available.
855 """ 855 """
856 if isinstance(next_page, list): 856 if isinstance(next_page, list) and len(previous_page) != 0:
857 if '_pagination_prev' in next_page[0]: 857 if '_pagination_prev' in next_page[0]:
858 params = copy.deepcopy(next_page[0]['_pagination_prev']) 858 params = copy.deepcopy(next_page[0]['_pagination_prev'])
859 else: 859 else:
Powered by cgit v1.2.3 (git 2.41.0)