From e0684c0c343835c7674a94424d847592511915b0 Mon Sep 17 00:00:00 2001 From: Christian Breunig Date: Thu, 9 Jul 2026 22:21:52 +0200 Subject: utils: T9008: migrate remaining cmd() callers to cmdl() and remove cmd() Complete the safer-subprocess migration started by the cmdl()/ifconfig refactoring and convert every remaining vyos.utils.process.cmd() call site to the list-based cmdl(). Drop the vyos.utils.process.cmd() implementation as it is no longer in use. --- src/validators/timezone | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/validators') diff --git a/src/validators/timezone b/src/validators/timezone index dd3e0654d..fe8e10cb6 100755 --- a/src/validators/timezone +++ b/src/validators/timezone @@ -17,7 +17,7 @@ import argparse import sys -from vyos.utils.process import cmd +from vyos.utils.process import cmdl if __name__ == '__main__': @@ -25,7 +25,7 @@ if __name__ == '__main__': parser.add_argument("--validate", action="store", required=True, help="Check if timezone is valid") args = parser.parse_args() - tz_data = cmd('timedatectl list-timezones') + tz_data = cmdl(['timedatectl', 'list-timezones']) tz_data = tz_data.split('\n') if args.validate not in tz_data: -- cgit v1.2.3