src/eric7/QScintilla/Exporters/__init__.py

branch
eric7
changeset 9497
8beca4047c53
parent 9487
78cb053591c9
child 9653
e67609152c5e
--- a/src/eric7/QScintilla/Exporters/__init__.py	Wed Nov 09 10:37:21 2022 +0100
+++ b/src/eric7/QScintilla/Exporters/__init__.py	Wed Nov 09 10:59:01 2022 +0100
@@ -42,17 +42,15 @@
         (QScintilla.Exporter.Exporter)
     """
     exporterMapping = {
-        "HTML": "ExporterHTML",
-        "ODT": "ExporterODT",
-        "PDF": "ExporterPDF",
-        "RTF": "ExporterRTF",
-        "TeX": "ExporterTEX",
+        "HTML": ".ExporterHTML",
+        "ODT": ".ExporterODT",
+        "PDF": ".ExporterPDF",
+        "RTF": ".ExporterRTF",
+        "TeX": ".ExporterTEX",
     }
     with contextlib.suppress(ImportError):
         if exporterFormat in exporterMapping:
-            mod = importlib.import_module(
-                "eric7.QScintilla.Exporters.{0}".format(exporterMapping[exporterFormat])
-            )
+            mod = importlib.import_module(exporterMapping[exporterFormat], __package__)
             return mod.createExporter(editor)
 
     return None

eric ide

mercurial