forked from openlp/openlp
do not try to save an empty list
This commit is contained in:
parent
a1577df2be
commit
4eb1c3b4f1
@ -592,8 +592,10 @@ class OpenLyrics(object):
|
|||||||
found_tags.append(openlp_tag)
|
found_tags.append(openlp_tag)
|
||||||
existing_tag_ids = [tag[u'start tag'] for tag in FormattingTags.get_html_tags()]
|
existing_tag_ids = [tag[u'start tag'] for tag in FormattingTags.get_html_tags()]
|
||||||
new_tags = [tag for tag in found_tags if tag[u'start tag'] not in existing_tag_ids]
|
new_tags = [tag for tag in found_tags if tag[u'start tag'] not in existing_tag_ids]
|
||||||
FormattingTags.add_html_tags(new_tags)
|
# Do not save an empty list.
|
||||||
FormattingTags.save_html_tags()
|
if new_tags:
|
||||||
|
FormattingTags.add_html_tags(new_tags)
|
||||||
|
FormattingTags.save_html_tags()
|
||||||
|
|
||||||
def _process_lines_mixed_content(self, element, newlines=True):
|
def _process_lines_mixed_content(self, element, newlines=True):
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user