From b22ec1522a7e468e53f1ea753ea076934ae5d142 Mon Sep 17 00:00:00 2001 From: Anri Dellal <anridellal@gmail.com> Date: Sat, 30 Nov 2024 12:04:41 +0300 Subject: [PATCH] .ci/testcases/test_device.py: fix TypeError errors (MR 5863) Fix TypeError when RuntimeError is thrown Example: FAILED testcases/test_device.py::test_aports_device - TypeError: can only concatenate str (not "PosixPath") to str --- .ci/testcases/test_device.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.ci/testcases/test_device.py b/.ci/testcases/test_device.py index 4b458f173e0..7bed5c13f89 100644 --- a/.ci/testcases/test_device.py +++ b/.ci/testcases/test_device.py @@ -47,8 +47,7 @@ def test_aports_device(): if "postmarketos-base" == dependency or "postmarketos-base>" in dependency: depend_flag = True if not depend_flag: - raise RuntimeError("Missing 'postmarketos-base' in depends of " + - path) + raise RuntimeError(f"Missing 'postmarketos-base' in depends of {path}") # Depends: Must not have specific packages for depend in apkbuild["depends"]: @@ -61,7 +60,7 @@ def test_aports_device(): raise RuntimeError("wrong architecture, please change to arch=\"" f"{deviceinfo.arch}\": {path}") if "!archcheck" not in apkbuild["options"]: - raise RuntimeError("!archcheck missing in options= line: " + path) + raise RuntimeError(f"!archcheck missing in options= line: {path}") def test_aports_device_kernel(): -- GitLab