Skip to content

Commit ed7f205

Browse files
zetabengarrettheel
authored andcommitted
Fix Python 3 compatibility of PageIterator#key_names (pynamodb#535)
1 parent 57f5be3 commit ed7f205

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pynamodb/pagination.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import time
2+
import six
23
from pynamodb.constants import (CAMEL_COUNT, ITEMS, LAST_EVALUATED_KEY, SCANNED_COUNT,
34
CONSUMED_CAPACITY, TOTAL, CAPACITY_UNITS)
45

@@ -119,7 +120,7 @@ def key_names(self):
119120
return self._last_evaluated_key.keys()
120121

121122
# Use the table meta data to determine the key attributes
122-
table_meta = self._operation.im_self.get_meta_table()
123+
table_meta = six.get_method_self(self._operation).get_meta_table()
123124
return table_meta.get_key_names(self._kwargs.get('index_name'))
124125

125126
@property

0 commit comments

Comments
 (0)