key = _DeadlockWrap(cur.first, 0,0,0)[0]
yield key
- next = cur.next
+ next = getattr(cur, "next")
while 1:
try:
key = _DeadlockWrap(next, 0,0,0)[0]
# FIXME-20031101-greg: race condition. cursor could
# be closed by another thread before this call.
_DeadlockWrap(cur.set, key,0,0,0)
- next = cur.next
+ next = getattr(cur, "next")
except _bsddb.DBNotFoundError:
pass
except _bsddb.DBCursorClosedError:
key = kv[0]
yield kv
- next = cur.next
+ next = getattr(cur, "next")
while 1:
try:
kv = _DeadlockWrap(next)
# FIXME-20031101-greg: race condition. cursor could
# be closed by another thread before this call.
_DeadlockWrap(cur.set, key,0,0,0)
- next = cur.next
+ next = getattr(cur, "next")
except _bsddb.DBNotFoundError:
pass
except _bsddb.DBCursorClosedError:
self._checkCursor()
return _DeadlockWrap(self.dbc.set_range, key)
- def next(self):
+ def next(self): # Renamed by "2to3"
self._checkOpen()
self._checkCursor()
- rv = _DeadlockWrap(self.dbc.next)
+ rv = _DeadlockWrap(getattr(self.dbc, "next"))
return rv
+ if sys.version_info[0] >= 3 : # For "2to3" conversion
+ next = __next__
+
def previous(self):
self._checkOpen()
self._checkCursor()