python 3 support: fixes, no longer maxint, missing sys import, next change by 2to3
svn: r20637
This commit is contained in:
parent
5326703ef0
commit
70d50d2fc2
@ -133,7 +133,7 @@ def __do_export(database):
|
||||
data = cursor.first()
|
||||
while data:
|
||||
pickle.dump(data, backup_table, 2)
|
||||
data = next(cursor)
|
||||
data = cursor.next()
|
||||
cursor.close()
|
||||
backup_table.close()
|
||||
except (IOError,OSError):
|
||||
|
@ -1182,7 +1182,7 @@ class DbBsddb(DbBsddbRead, DbWriteBase, UpdateCallback):
|
||||
|
||||
def create_id(self):
|
||||
return "%08x%08x" % ( int(time.time()*10000),
|
||||
self.rand.randint(0, maxint))
|
||||
self.rand.randint(0, maxsize))
|
||||
|
||||
def __add_object(self, obj, transaction, find_next_func, commit_func):
|
||||
if find_next_func and not obj.gramps_id:
|
||||
|
@ -56,6 +56,7 @@ from __future__ import print_function
|
||||
|
||||
import logging
|
||||
import bisect
|
||||
import sys
|
||||
import time
|
||||
|
||||
_LOG = logging.getLogger(".gui.basetreemodel")
|
||||
|
@ -324,7 +324,7 @@ class DbGrdb(Callback):
|
||||
|
||||
def create_id(self):
|
||||
return "%08x%08x" % ( int(time.time()*10000),
|
||||
self.rand.randint(0, maxint))
|
||||
self.rand.randint(0, maxsize))
|
||||
|
||||
def get_person_cursor(self):
|
||||
raise NotImplementedError
|
||||
|
Loading…
Reference in New Issue
Block a user