diff options
author | Kim Hagen <kim.sidney@gmail.com> | 2016-09-15 12:28:12 +0200 |
---|---|---|
committer | Kim Hagen <kim.sidney@gmail.com> | 2016-09-15 12:28:12 +0200 |
commit | a34e4f13c9b387c184b4f55d53477b0b33610bd7 (patch) | |
tree | b29a44eba89c5db6f144c94116a0a410f58a19ff | |
parent | bb2e1e9dbb7bdf153bf43056d64e82d749a3aa81 (diff) | |
download | vyatta-op-a34e4f13c9b387c184b4f55d53477b0b33610bd7.tar.gz vyatta-op-a34e4f13c9b387c184b4f55d53477b0b33610bd7.zip |
fix error message "NameError: name 'CalledProcessError' is not defined"
when doing a 'show version' on a non virtual machine
-rw-r--r-- | scripts/vyos-show-version | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/vyos-show-version b/scripts/vyos-show-version index a701b84..c0609ca 100644 --- a/scripts/vyos-show-version +++ b/scripts/vyos-show-version @@ -73,7 +73,7 @@ system_type = "physical" try: hypervisor = subprocess.check_output('hvinfo', shell=True).strip() system_type = "{0} guest".format(hypervisor) -except CalledProcessError: +except subprocess.CalledProcessError: # hvinfo returns 1 if it cannot detect any hypervisor pass version_data['system_type'] = system_type |