From 5615876d2afadec978d6b079cf69be3a0c0573e5 Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Tue, 6 Jan 2004 06:11:28 +0000 Subject: [PATCH] * src/plugins/ReadGedcom.py: More source parsing cleanups. (parse_source_objects): Remove redundant function. svn: r2591 --- ChangeLog | 3 ++- src/plugins/ReadGedcom.py | 38 -------------------------------------- 2 files changed, 2 insertions(+), 39 deletions(-) diff --git a/ChangeLog b/ChangeLog index b5a7b3e48..da7dd0791 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,6 @@ 2004-01-05 Alex Roitman - * src/plugins/ReadGedcom.py: More source parsing cleanups. + * src/plugins/ReadGedcom.py: More source parsing cleanups. + (parse_source_objects): Remove redundant function. 2004-01-04 Alex Roitman * src/plugins/ReadGedcom.py: Correct level in parsing LDS ordinance diff --git a/src/plugins/ReadGedcom.py b/src/plugins/ReadGedcom.py index 9d2126bed..a6772084a 100644 --- a/src/plugins/ReadGedcom.py +++ b/src/plugins/ReadGedcom.py @@ -963,44 +963,6 @@ class GedcomParser: oref.setReference(photo) self.person.addPhoto(oref) - def parse_source_object(self,source,level): - form = "" - file = "" - title = "" - note = "" - while 1: - matches = self.get_next() - if matches[1] == "FORM": - form = string.lower(matches[2]) - elif matches[1] == "TITL": - title = matches[2] - elif matches[1] == "FILE": - file = matches[2] - elif matches[1] == "NOTE": - note = matches[2] + self.parse_continue_data(level+1) - elif int(matches[0]) < level: - self.backup() - break - else: - self.barf(level+1) - - if form: - (ok,path) = self.find_file(file,self.dir_path) - if not ok: - self.warn(_("Warning: could not import %s") % file + "\n") - self.warn(_("\tThe following paths were tried:\n\t\t")) - self.warn(string.join(path,"\n\t\t")) - self.warn('\n') - else: - photo = RelLib.Photo() - photo.setPath(path) - photo.setDescription(title) - photo.setMimeType(Utils.get_mime_type(path)) - self.db.addObject(photo) - oref = RelLib.ObjectRef() - oref.setReference(photo) - source.addPhoto(oref) - def parse_family_object(self,level): form = "" file = ""