diff options
author | Thomas Mangin <thomas.mangin@exa.net.uk> | 2020-04-05 14:36:29 +0100 |
---|---|---|
committer | Thomas Mangin <thomas.mangin@exa.net.uk> | 2020-04-06 20:22:35 +0100 |
commit | aceb0817a65bf01669cada3ceb60d65b81607bc3 (patch) | |
tree | 5418d4537cfc14115536315909fbb7a83277fe7a /src/conf_mode/interfaces-wirelessmodem.py | |
parent | 356950579c2b155f9d41c04ed63c7efde561b43a (diff) | |
download | vyos-1x-aceb0817a65bf01669cada3ceb60d65b81607bc3.tar.gz vyos-1x-aceb0817a65bf01669cada3ceb60d65b81607bc3.zip |
util: T2226: covert most calls from os.system to util
As little change a possible but the function call
The behaviour should be totally unchanged.
Diffstat (limited to 'src/conf_mode/interfaces-wirelessmodem.py')
-rwxr-xr-x | src/conf_mode/interfaces-wirelessmodem.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/conf_mode/interfaces-wirelessmodem.py b/src/conf_mode/interfaces-wirelessmodem.py index da33d54e4..4df459768 100755 --- a/src/conf_mode/interfaces-wirelessmodem.py +++ b/src/conf_mode/interfaces-wirelessmodem.py @@ -23,7 +23,7 @@ from netifaces import interfaces from vyos.config import Config from vyos.defaults import directories as vyos_data_dir -from vyos.util import chown_file, chmod_x, subprocess_cmd +from vyos.util import chown_file, chmod_x, cmd, run from vyos import ConfigError default_config_data = { @@ -48,7 +48,7 @@ def check_kmod(): modules = ['option', 'usb_wwan', 'usbserial'] for module in modules: if not os.path.exists(f'/sys/module/{module}'): - if os.system(f'modprobe {module}') != 0: + if run(f'modprobe {module}') != 0: raise ConfigError(f'Loading Kernel module {module} failed') def get_config(): |