From 2529ba1e2188041ed292823514e76905cf32fc4a Mon Sep 17 00:00:00 2001 From: Benny Malengier Date: Thu, 4 Dec 2008 14:12:49 +0000 Subject: [PATCH] 0002512: [Python 2.6 support] Change sets module by built-in set types patch Josip svn: r11410 --- src/GrampsDbUtils/_ReadXML.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/GrampsDbUtils/_ReadXML.py b/src/GrampsDbUtils/_ReadXML.py index eca460848..aef00c24a 100644 --- a/src/GrampsDbUtils/_ReadXML.py +++ b/src/GrampsDbUtils/_ReadXML.py @@ -27,10 +27,13 @@ #------------------------------------------------------------------------- import os import sys -import sets from xml.parsers.expat import ExpatError, ParserCreate from gettext import gettext as _ import re +try: + set() +except NameError: + from sets import Set as set #------------------------------------------------------------------------- # @@ -353,7 +356,7 @@ class GrampsParser(UpdateCallback): self.childref_map = {} self.change = change self.dp = DateHandler.parser - self.place_names = sets.Set() + self.place_names = set() self.info = ImportInfo() self.all_abs = True cursor = database.get_place_cursor()