Remove check for IdIterator.method.__self__ in IdIterator.next
authorHarmon <Harmon758@gmail.com>
Thu, 28 Jan 2021 20:13:59 +0000 (14:13 -0600)
committerHarmon <Harmon758@gmail.com>
Thu, 28 Jan 2021 20:13:59 +0000 (14:13 -0600)
tweepy/cursor.py

index 523e3f8ffc086e1e519b26b4779e63e8e650198c..2031812126037ef9197043683fd8ee0c77ae057f 100644 (file)
@@ -134,10 +134,7 @@ class IdIterator(BaseIterator):
             # This is a special invocation that returns the underlying
             # APIMethod class
             model = ModelParser().parse(self.method(create=True), data)
-            if hasattr(self.method, '__self__'):
-                result = self.method.__self__.parser.parse(self.method(create=True), data)
-            else:
-                result = model
+            result = self.method.__self__.parser.parse(self.method(create=True), data)
 
             if len(self.results) != 0:
                 self.index += 1