Description: Use importlib, imp is not available in Python3.12

Author: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Bug-Ubuntu: https://launchpad.net/bugs/2071547
Forwarded: no
Last-Update: 2024-06-30
---

--- gnome-activity-journal-1.0.0.19.g1e469ff.orig/gnome-activity-journal
+++ gnome-activity-journal-1.0.0.19.g1e469ff/gnome-activity-journal
@@ -99,11 +99,10 @@ def find_and_load_zeitgeist_module():
                       [os.path.join(RUN_DIR, '.' , repo) for repo in other_repos])
 
         # look for (and import) the needed modules
-        from imp import load_module, find_module
+        import importlib
         for module in other_repos:
-            m = find_module(module, repo_paths + sys.path)
-            print("Using the \"%s\" python module from %s" % (module, os.path.abspath(m[1])))
-            load_module(module, *m)
+            print("Using the \"%s\" python module" % (module))
+            importlib.import_module(module)
 
     except ImportError as e:
         print("ERROR: %s." % e)
