diff options
author | Lorenz Diener <[email protected]> | 2017-09-08 16:40:43 +0200 |
---|---|---|
committer | Lorenz Diener <[email protected]> | 2017-09-08 16:40:43 +0200 |
commit | 419bedc55a0d573ab5dbaba3fb48a17c4d21fb1b (patch) | |
tree | bf6fb9630c470c2c62dc8fe78341737d5e3e0eec /mastodon | |
parent | a93a1abcd38798833f4c9ac4c1deaeb7f9a51967 (diff) | |
download | mastodon.py-419bedc55a0d573ab5dbaba3fb48a17c4d21fb1b.tar.gz |
Potential fix for #81
Diffstat (limited to 'mastodon')
-rw-r--r-- | mastodon/Mastodon.py | 4 |
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: |