From 5ce7b7c53954c0cda02c06aacc9183a074f4a4f1 Mon Sep 17 00:00:00 2001 From: Brian Matherly Date: Thu, 12 Apr 2007 11:51:53 +0000 Subject: [PATCH] 0001011: XML import loses media objects when media object has no title. svn: r8380 --- ChangeLog | 4 ++++ src/GrampsDbUtils/_ReadXML.py | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index aa0554ff1..3d90d8184 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2007-04-12 Brian Matherly + * src/GrampsDbUtils/_ReadXML.py: 0001011: XML import loses media objects + when media object has no title. + 2007-04-09 Brian Matherly * src/Config/_GrampsIniKeys.py: Remove file check - it is not needed. diff --git a/src/GrampsDbUtils/_ReadXML.py b/src/GrampsDbUtils/_ReadXML.py index dd3be54b9..cc5b847d7 100644 --- a/src/GrampsDbUtils/_ReadXML.py +++ b/src/GrampsDbUtils/_ReadXML.py @@ -1035,7 +1035,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):