osmith has submitted this change. (
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(-)
Approvals:
fixeria: Looks good to me, but someone else must approve
Jenkins Builder: Verified
daniel: Looks good to me, but someone else must approve
pespin: Looks good to me, approved
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-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged