From 561554e6cb7feb9c30521b04468f6d5da3eaa0f2 Mon Sep 17 00:00:00 2001 From: Craig Warren Date: Mon, 27 Feb 2017 15:35:24 +0000 Subject: [PATCH] Split CPU ID string on Windows. --- gprMax/utilities.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gprMax/utilities.py b/gprMax/utilities.py index 3aa849f2..e197af01 100644 --- a/gprMax/utilities.py +++ b/gprMax/utilities.py @@ -171,8 +171,10 @@ def get_host_info(): # CPU information allcpuinfo = subprocess.check_output("wmic cpu get Name", shell=True).decode('utf-8').strip() + allcpuinfo = allcpuinfo.split('\n') sockets = 0 for line in allcpuinfo: + print(line) if 'CPU' in line: cpuID = line.strip() sockets += 1 @@ -183,9 +185,9 @@ def get_host_info(): # OS version if platform.machine().endswith('64'): - osbit = '(64-bit)' + osbit = ' (64-bit)' else: - osbit = '(32-bit)' + osbit = ' (32-bit)' osversion = 'Windows ' + platform.release() + osbit # Mac OS X/macOS