summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-05-20 11:35:09 +0200
committerMichael Stahl <michael.stahl@allotropia.de>2023-02-23 19:06:46 +0100
commit31e0dec25f67b0fb649586858bd4f37a48313bc2 (patch)
tree91525c147ca2f37d7b48f2d6d26fc09db6766733
parentdfec9b6de562240ecff503b3164d63fac878656c (diff)
fix some more python 3.8 deprecation warnings
Change-Id: I8bdbf05f1357aea83a3cdda2f06d63c7d04de8f9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94561 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit 0a3d414fb0ac27292320d99f802722a8a9670240) (cherry picked from commit 3c35db9b7aa52878bb7739e732bebfb2f580bc29)
-rw-r--r--pyuno/source/loader/pythonloader.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pyuno/source/loader/pythonloader.py b/pyuno/source/loader/pythonloader.py
index ddb9001fc0e6..a6b75003d4c8 100644
--- a/pyuno/source/loader/pythonloader.py
+++ b/pyuno/source/loader/pythonloader.py
@@ -19,7 +19,7 @@
import uno
import unohelper
import sys
-import imp
+import types
import os
from com.sun.star.uno import Exception,RuntimeException
from com.sun.star.loader import XImplementationLoader
@@ -82,7 +82,7 @@ class Loader( XImplementationLoader, XServiceInfo, unohelper.Base ):
# did we load the module already ?
mod = g_loadedComponents.get( url )
if not mod:
- mod = imp.new_module("uno_component")
+ mod = types.ModuleType("uno_component")
# check for pythonpath.zip beside .py files
checkForPythonPathBesideComponent( url[0:url.rfind('/')] )