From 1d6ec38629bc099a91ab34198b7a6d822a66d9c2 Mon Sep 17 00:00:00 2001 From: Martin Hawlisch Date: Tue, 19 Apr 2005 14:47:02 +0000 Subject: [PATCH] * src/GrampsDbBase.py (create_id): Use sys.maxint to get the maximum possible integer number svn: r4377 --- gramps2/ChangeLog | 2 ++ gramps2/src/GrampsDbBase.py | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index afb77091f..3e0a248b1 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -3,6 +3,8 @@ that uses gtk+ only. Still incomplete. * src/gramps_main.py: Removed canvas specific calls of the PedView + * src/GrampsDbBase.py (create_id): Use sys.maxint to get the maximum possible integer number + 2005-04-18 Don Allingham * src/edit_person.glade: re-add edit_person.glade * src/EditPerson.py: start of new EditPerson dialog diff --git a/gramps2/src/GrampsDbBase.py b/gramps2/src/GrampsDbBase.py index 78843cdde..9723c448b 100644 --- a/gramps2/src/GrampsDbBase.py +++ b/gramps2/src/GrampsDbBase.py @@ -35,6 +35,7 @@ import time import random import locale import re +from sys import maxint from gettext import gettext as _ #------------------------------------------------------------------------- @@ -211,8 +212,8 @@ class GrampsDbBase(GrampsDBCallback.GrampsDBCallback): def create_id(self): return "%08x%08x%08x" % ( int(time.time()*10000), - self.rand.randint(0,0xffffffff), - self.rand.randint(0,0xffffffff)) + self.rand.randint(0,maxint), + self.rand.randint(0,maxint)) def get_person_cursor(self): assert False, "Needs to be overridden in the derived class"