Updated exception handling for missing manufacturer/model info in Linux.

这个提交包含在:
Craig Warren
2017-02-28 11:01:17 +00:00
父节点 ab0b342550
当前提交 a2f624d137

查看文件

@@ -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()