tests/functional/qemu_test: Silence warnings from pylint in config.py
Pylint complains here: config.py:1:0: C0114: Missing module docstring (missing-module-docstring) config.py:28:4: W0719: Raising too general exception: Exception (broad-exception-raised) Add a module description and replace the general Exception to fix this. And while we're at it, and since we've got a proper module description string now, also replace the copy-n-pasted comment at the top of the file with a proper SPDX identifier. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Thomas Huth <thuth@redhat.com> Message-ID: <20260324163543.55503-5-thuth@redhat.com>
Thomas Huth committed
Mar 24, 2026 at 17:35 UTC
de9698ead4cf69f381762cf0e07ffd1dd5b06a59
1 file changed
+7
-4
tests/functional/qemu_test/config.py
+7
-4
@@ -1,4 +1,4 @@
1
-# Test class and utilities for functional tests
1
+# SPDX-License-Identifier: GPL-2.0-or-later
2
#
3
# Copyright 2018, 2024 Red Hat, Inc.
4
#
@@ -10,6 +10,9 @@
10
#
11
# This work is licensed under the terms of the GNU GPL, version 2 or
12
# later. See the COPYING file in the top-level directory.
13
+'''
14
+Functions related to the configuration of the tests and of the host system
15
+'''
16
17
import os
18
from pathlib import Path
@@ -25,9 +28,9 @@ def _build_dir():
28
if root is not None:
29
return Path(root)
30
28
- raise Exception("Missing MESON_BUILD_ROOT environment variable. " +
29
- "Please use the '<BUILD-DIR>/run' script if invoking " +
30
- "directly instead of via make/meson")
31
+ raise RuntimeError("Missing MESON_BUILD_ROOT environment variable. " +
32
+ "Please use the '<BUILD-DIR>/run' script if invoking " +
33
+ "directly instead of via make/meson")
34
35
BUILD_DIR = _build_dir()
36