summaryrefslogtreecommitdiff
path: root/src/op_mode/snmp.py
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-04-07 08:27:36 +0200
committerGitHub <noreply@github.com>2020-04-07 08:27:36 +0200
commit09ad28b28c9ebd9308cfe9048686b3b0ef9cfd9c (patch)
tree6e7b0971ecd8859cff864b3ebb37f86f8ba288f5 /src/op_mode/snmp.py
parente0f13b79a669e7fc8cadac8757b2f5fbbf51dc99 (diff)
parent7256810914e6664bf92041dcd7c3daf649ce0001 (diff)
downloadvyos-1x-09ad28b28c9ebd9308cfe9048686b3b0ef9cfd9c.tar.gz
vyos-1x-09ad28b28c9ebd9308cfe9048686b3b0ef9cfd9c.zip
Merge pull request #307 from thomas-mangin/T2226
util: T2226: convert all call to use vyos.util.{popen, cmd, run}
Diffstat (limited to 'src/op_mode/snmp.py')
-rwxr-xr-xsrc/op_mode/snmp.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/op_mode/snmp.py b/src/op_mode/snmp.py
index e08441f0e..b09eab97f 100755
--- a/src/op_mode/snmp.py
+++ b/src/op_mode/snmp.py
@@ -24,6 +24,7 @@ import sys
import argparse
from vyos.config import Config
+from vyos.util import run
config_file_daemon = r'/etc/snmp/snmpd.conf'
@@ -53,7 +54,7 @@ def show_all():
def show_community(c, h):
print('Status of SNMP community {0} on {1}'.format(c, h), flush=True)
- os.system('/usr/bin/snmpstatus -t1 -v1 -c {0} {1}'.format(c, h))
+ run('/usr/bin/snmpstatus -t1 -v1 -c {0} {1}'.format(c, h))
if __name__ == '__main__':
args = parser.parse_args()