summaryrefslogtreecommitdiff
path: root/src/op_mode
diff options
context:
space:
mode:
authorThomas Mangin <thomas.mangin@exa.net.uk>2020-04-05 18:09:46 +0100
committerThomas Mangin <thomas.mangin@exa.net.uk>2020-04-06 20:22:35 +0100
commitad723975a71f75081b4a38c9eb083dd941fe1bc9 (patch)
tree3bec845fff7431a09c319afe603bd46541dc2874 /src/op_mode
parentdc261d67c32879bff0909b7fdacb9fbbf8e697c9 (diff)
downloadvyos-1x-ad723975a71f75081b4a38c9eb083dd941fe1bc9.tar.gz
vyos-1x-ad723975a71f75081b4a38c9eb083dd941fe1bc9.zip
util: T2226: rewrite system integrity to use cmd, run
Diffstat (limited to 'src/op_mode')
-rwxr-xr-xsrc/op_mode/system_integrity.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/op_mode/system_integrity.py b/src/op_mode/system_integrity.py
index 886d94f16..c0e3d1095 100755
--- a/src/op_mode/system_integrity.py
+++ b/src/op_mode/system_integrity.py
@@ -18,18 +18,19 @@
import sys
import os
-import subprocess
import re
import itertools
from datetime import datetime, timedelta
+from vyos.util import cmd
+
verf = r'/usr/libexec/vyos/op_mode/version.py'
def get_sys_build_version():
if not os.path.exists(verf):
return None
- a = subprocess.check_output(['/usr/libexec/vyos/op_mode/version.py']).decode()
+ a = cmd('/usr/libexec/vyos/op_mode/version.py')
if re.search('^Built on:.+',a, re.M) == None:
return None