From 004df1cef80fea5be727af757633df812c0583a3 Mon Sep 17 00:00:00 2001 From: Brian Matherly Date: Thu, 12 Apr 2007 11:46:36 +0000 Subject: [PATCH] 0001011: XML import loses media objects when media object has no title. svn: r8379 --- gramps2/ChangeLog | 4 ++++ gramps2/src/GrampsDb/_ReadXML.py | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index c92663e14..911cdf862 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,3 +1,7 @@ +2007-04-12 Brian Matherly + * src/GrampsDb/_ReadXML.py: 0001011: XML import loses media objects when + media object has no title + 2007-04-11 Don Allingham * src/GrampsDb/_WriteGedcom.py (GedcomWriter.write_source_ref): replace newlines with semicolons on output. diff --git a/gramps2/src/GrampsDb/_ReadXML.py b/gramps2/src/GrampsDb/_ReadXML.py index 95c8d06f4..1dfc7ba83 100644 --- a/gramps2/src/GrampsDb/_ReadXML.py +++ b/gramps2/src/GrampsDb/_ReadXML.py @@ -1005,7 +1005,10 @@ class GrampsParser(UpdateCallback): def start_file(self,attrs): self.object.mime = attrs['mime'] - self.object.desc = attrs['description'] + if attrs.has_key('description'): + self.object.desc = attrs['description'] + else: + self.object.desc = "" drive,src = os.path.splitdrive(attrs["src"]) if src: if not drive and not os.path.isabs(src):