From a2f624d137df66998cec78350154801c1e899b87 Mon Sep 17 00:00:00 2001 From: Craig Warren Date: Tue, 28 Feb 2017 11:01:17 +0000 Subject: [PATCH] Updated exception handling for missing manufacturer/model info in Linux. --- gprMax/utilities.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gprMax/utilities.py b/gprMax/utilities.py index 7cde9c81..503e5868 100644 --- a/gprMax/utilities.py +++ b/gprMax/utilities.py @@ -216,9 +216,9 @@ def get_host_info(): try: manufacturer = subprocess.check_output("cat /sys/class/dmi/id/sys_vendor", shell=True).decode('utf-8').strip() model = subprocess.check_output("cat /sys/class/dmi/id/product_name", shell=True).decode('utf-8').strip() - except: - pass machineID = manufacturer + ' ' + model + except subprocess.CalledProcessError: + pass # CPU information allcpuinfo = subprocess.check_output("lscpu", shell=True).decode('utf-8').strip()