From a34e4f13c9b387c184b4f55d53477b0b33610bd7 Mon Sep 17 00:00:00 2001 From: Kim Hagen <kim.sidney@gmail.com> Date: Thu, 15 Sep 2016 12:28:12 +0200 Subject: fix error message "NameError: name 'CalledProcessError' is not defined" when doing a 'show version' on a non virtual machine --- scripts/vyos-show-version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.3