diff options
Diffstat (limited to 'src/op_mode/version.py')
-rwxr-xr-x | src/op_mode/version.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/op_mode/version.py b/src/op_mode/version.py index 34eca44b1..8599c958f 100755 --- a/src/op_mode/version.py +++ b/src/op_mode/version.py @@ -30,7 +30,10 @@ import pystache import vyos.version import vyos.limericks -from vyos.util import cmd, run +from vyos.util import cmd +from vyos.util import call +from vyos.util import run +from vyos.util import DEVNULL parser = argparse.ArgumentParser() @@ -80,7 +83,7 @@ if __name__ == '__main__': # Get hypervisor name, if any system_type = "bare metal" try: - hypervisor = cmd('hvinfo 2>/dev/null') + hypervisor = cmd('hvinfo',stderr=DEVNULL) system_type = "{0} guest".format(hypervisor) except OSError: # hvinfo returns 1 if it cannot detect any hypervisor @@ -119,7 +122,7 @@ if __name__ == '__main__': if args.all: print("Package versions:") - run("dpkg -l") + call("dpkg -l") if args.funny: print(vyos.limericks.get_random()) |