Skip to content

Commit 72d24e7

Browse files
committed
el9to10: actors: mysql: Replace subprocess run with leapp wrapper
1 parent 83e4219 commit 72d24e7

File tree

1 file changed

+3
-5
lines changed
  • repos/system_upgrade/el9toel10/actors/mysql/scanmysql/libraries

1 file changed

+3
-5
lines changed

repos/system_upgrade/el9toel10/actors/mysql/scanmysql/libraries/scanmysql.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from leapp.models import DistributionSignedRPM, MySQLConfiguration
22
from leapp.libraries.common.rpms import has_package
3-
from leapp.libraries.stdlib import api
3+
from leapp.libraries.stdlib import api, run
44

55
import subprocess
66

@@ -43,11 +43,9 @@ def _check_incompatible_config() -> set[str]:
4343
"""
4444

4545
found_options = set()
46-
out = subprocess.run(['mysqld', '--validate-config', '--log-error-verbosity=2'],
47-
capture_output=True,
48-
check=False)
46+
stderr = run(['mysqld', '--validate-config', '--log-error-verbosity=2'],
47+
checked=False)['stderr']
4948

50-
stderr = out.stderr.decode("utf-8")
5149
if 'deprecated' in stderr:
5250
found_options = {arg for arg
5351
in REMOVED_ARGS

0 commit comments

Comments
 (0)