diff options
author | Christian Poessinger <christian@poessinger.com> | 2020-04-11 20:36:39 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-11 20:36:39 +0200 |
commit | da03bbf8767be74957baae68bf9ffc0e9f56ddac (patch) | |
tree | bcdfb217eb1bc75d06ce5af604836c6be999a749 /src/op_mode/version.py | |
parent | 143d292209b6ebe24f90667f2d5edd0216151163 (diff) | |
parent | 5763af8cbe7e2ad35a1eb336e77a6fe74ac2534e (diff) | |
download | vyos-1x-da03bbf8767be74957baae68bf9ffc0e9f56ddac.tar.gz vyos-1x-da03bbf8767be74957baae68bf9ffc0e9f56ddac.zip |
Merge pull request #329 from thomas-mangin/T2226
util: T2226: improvement and fixes
Diffstat (limited to 'src/op_mode/version.py')
-rwxr-xr-x | src/op_mode/version.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/op_mode/version.py b/src/op_mode/version.py index fe6ecbae5..8599c958f 100755 --- a/src/op_mode/version.py +++ b/src/op_mode/version.py @@ -33,6 +33,7 @@ import vyos.limericks from vyos.util import cmd from vyos.util import call from vyos.util import run +from vyos.util import DEVNULL parser = argparse.ArgumentParser() @@ -82,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 |