diff --git a/openlp/plugins/songs/lib/oooimport.py b/openlp/plugins/songs/lib/oooimport.py index ddbab8b31..fb6ee43a6 100644 --- a/openlp/plugins/songs/lib/oooimport.py +++ b/openlp/plugins/songs/lib/oooimport.py @@ -40,6 +40,7 @@ if os.name == u'nt': PAGE_BEFORE = 4 PAGE_AFTER = 5 PAGE_BOTH = 6 + NoConnectException = Exception else: import uno from com.sun.star.connection import NoConnectException diff --git a/openlp/plugins/songs/lib/sofimport.py b/openlp/plugins/songs/lib/sofimport.py index 5cc0482f2..7f0bed72b 100644 --- a/openlp/plugins/songs/lib/sofimport.py +++ b/openlp/plugins/songs/lib/sofimport.py @@ -36,7 +36,7 @@ import os import re from oooimport import OooImport -from com.sun.star.uno import RuntimeException + log = logging.getLogger(__name__) @@ -44,12 +44,14 @@ if os.name == u'nt': BOLD = 150.0 ITALIC = 2 from oooimport import PAGE_BEFORE, PAGE_AFTER, PAGE_BOTH + RuntimeException = Exception else: try: from com.sun.star.awt.FontWeight import BOLD from com.sun.star.awt.FontSlant import ITALIC from com.sun.star.style.BreakType import PAGE_BEFORE, PAGE_AFTER, \ PAGE_BOTH + from com.sun.star.uno import RuntimeException except ImportError: pass