summaryrefslogtreecommitdiff
path: root/wizards/com/sun/star/wizards/common/NoValidPathException.py
diff options
context:
space:
mode:
Diffstat (limited to 'wizards/com/sun/star/wizards/common/NoValidPathException.py')
-rw-r--r--wizards/com/sun/star/wizards/common/NoValidPathException.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/wizards/com/sun/star/wizards/common/NoValidPathException.py b/wizards/com/sun/star/wizards/common/NoValidPathException.py
index 07794852710f..54fb58613c09 100644
--- a/wizards/com/sun/star/wizards/common/NoValidPathException.py
+++ b/wizards/com/sun/star/wizards/common/NoValidPathException.py
@@ -22,8 +22,16 @@ class NoValidPathException(Exception):
# TODO: NEVER open a dialog in an exception
from .SystemDialog import SystemDialog
if xMSF:
- import imp, os
- imp.load_source('strings', os.path.join(os.path.dirname(__file__), '../common/strings.hrc'))
+ import sys, os
+
+ # imp is deprecated since Python v.3.4
+ if sys.version_info >= (3,3):
+ from importlib.machinery import SourceFileLoader
+ SourceFileLoader('strings', os.path.join(os.path.dirname(__file__), '../common/strings.hrc')).load_module()
+ else:
+ import imp
+ imp.load_source('strings', os.path.join(os.path.dirname(__file__), '../common/strings.hrc'))
+
import strings
SystemDialog.showErrorBox(xMSF, strings.RID_COMMON_START_21) #OfficePathnotavailable