From fa79dd2cca89638a936459eac89a67600882f8c9 Mon Sep 17 00:00:00 2001 From: Andreas Preikschat Date: Fri, 17 Dec 2010 15:28:19 +0100 Subject: [PATCH] keep copyright field empty if imported song does not have any copyright information --- openlp/core/lib/serviceitem.py | 1 + openlp/plugins/songs/lib/xml.py | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/openlp/core/lib/serviceitem.py b/openlp/core/lib/serviceitem.py index b9394030a..9b4a035a5 100644 --- a/openlp/core/lib/serviceitem.py +++ b/openlp/core/lib/serviceitem.py @@ -44,6 +44,7 @@ class ServiceItemType(object): Image = 2 Command = 3 + class ItemCapabilities(object): """ Provides an enumeration of a serviceitem's capabilities diff --git a/openlp/plugins/songs/lib/xml.py b/openlp/plugins/songs/lib/xml.py index d26919d79..9d98737dc 100644 --- a/openlp/plugins/songs/lib/xml.py +++ b/openlp/plugins/songs/lib/xml.py @@ -297,6 +297,8 @@ class OpenLyricsParser(object): song_xml = objectify.fromstring(xml) properties = song_xml.properties song.copyright = unicode(properties.copyright.text) + if song.copyright == u'None': + song.copyright = u'' song.verse_order = unicode(properties.verseOrder.text) if song.verse_order == u'None': song.verse_order = u'' @@ -357,7 +359,7 @@ class OpenLyricsParser(object): def _add_text_to_element(self, tag, parent, text=None, label=None): if label: - element = etree.Element(tag, name = unicode(label)) + element = etree.Element(tag, name=unicode(label)) else: element = etree.Element(tag) if text: