Merge "Port pagination on Python 3"
This commit is contained in:
commit
7c46c3734d
@ -1,6 +1,4 @@
|
||||
# Use a blacklist of tests known to fail on Python 3, until
|
||||
# all unit tests will pass on Python 3.
|
||||
guestagent.test_cassandra_manager
|
||||
guestagent.test_mongodb_manager
|
||||
guestagent.test_operating_system
|
||||
guestagent.test_volume
|
||||
|
@ -37,6 +37,8 @@ def paginate_list(li, limit=None, marker=None, include_marker=False,
|
||||
"""
|
||||
sli = sorted(li, key=key)
|
||||
index = [key(item) for item in sli]
|
||||
if marker is None:
|
||||
marker = ''
|
||||
if include_marker:
|
||||
pos = bisect.bisect_left(index, marker)
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user