osmith has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmo-ci/+/37170?usp=email )
Change subject: OBS: fix python 3.12 compat
......................................................................
OBS: fix python 3.12 compat
Fix for:
File "/home/user/code/osmo-dev/src/osmo-ci/scripts/obs/lib/__init__.py", line
112, in check_required_programs
if not importlib.find_loader(module):
^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'importlib' has no attribute 'find_loader
Change-Id: I6430c2c4f75c8408d00305e1a1f0a64600eb086c
---
M scripts/obs/lib/__init__.py
1 file changed, 18 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/70/37170/1
diff --git a/scripts/obs/lib/__init__.py b/scripts/obs/lib/__init__.py
index 5292dc5..a85f777 100644
--- a/scripts/obs/lib/__init__.py
+++ b/scripts/obs/lib/__init__.py
@@ -1,7 +1,7 @@
#!/usr/bin/env python3
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright 2022 sysmocom - s.f.m.c. GmbH <info(a)sysmocom.de>
-import importlib
+import importlib.util
import os
import shutil
import subprocess
@@ -95,7 +95,7 @@
ok = False
for module in lib.config.required_python_modules:
- if not importlib.find_loader(module):
+ if not importlib.util.find_spec(module):
print(f"ERROR: missing python3 module: {module}")
ok = False
--
To view, visit
https://gerrit.osmocom.org/c/osmo-ci/+/37170?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: I6430c2c4f75c8408d00305e1a1f0a64600eb086c
Gerrit-Change-Number: 37170
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: newchange