From 72d24e70b82246b51660d00519f403daa0e99fdb Mon Sep 17 00:00:00 2001 From: Ales Nezbeda Date: Thu, 23 Jan 2025 16:47:12 +0100 Subject: [PATCH] el9to10: actors: mysql: Replace subprocess run with leapp wrapper --- .../actors/mysql/scanmysql/libraries/scanmysql.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/repos/system_upgrade/el9toel10/actors/mysql/scanmysql/libraries/scanmysql.py b/repos/system_upgrade/el9toel10/actors/mysql/scanmysql/libraries/scanmysql.py index 9ed82f02e8..9f7a175ead 100644 --- a/repos/system_upgrade/el9toel10/actors/mysql/scanmysql/libraries/scanmysql.py +++ b/repos/system_upgrade/el9toel10/actors/mysql/scanmysql/libraries/scanmysql.py @@ -1,6 +1,6 @@ from leapp.models import DistributionSignedRPM, MySQLConfiguration from leapp.libraries.common.rpms import has_package -from leapp.libraries.stdlib import api +from leapp.libraries.stdlib import api, run import subprocess @@ -43,11 +43,9 @@ def _check_incompatible_config() -> set[str]: """ found_options = set() - out = subprocess.run(['mysqld', '--validate-config', '--log-error-verbosity=2'], - capture_output=True, - check=False) + stderr = run(['mysqld', '--validate-config', '--log-error-verbosity=2'], + checked=False)['stderr'] - stderr = out.stderr.decode("utf-8") if 'deprecated' in stderr: found_options = {arg for arg in REMOVED_ARGS