From d7cf87af204298458ca6ab6f92186c87ee32645d Mon Sep 17 00:00:00 2001 From: Filip Brzozowski <63065775+fbrzoz@users.noreply.github.com> Date: Wed, 17 Jun 2020 14:39:50 +0200 Subject: Fix architecture misidentification --- dwt_util.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/dwt_util.py b/dwt_util.py index 62bde2b..ee2d725 100644 --- a/dwt_util.py +++ b/dwt_util.py @@ -65,9 +65,8 @@ class CalledProcessError(Exception): def is_64bit(): if os.name == 'nt': - output = subprocess.check_output(['wmic', 'os', 'get', 'OSArchitecture']) - os_arch = output.split()[1] - return True if os_arch == '64-bit' else False + os_arch = os.environ["PROCESSOR_ARCHITEW6432"] + return True if os_arch == 'AMD64' else False else: logger.critical("This was only meant to be run on Windows-based system. Specifically, Windows 10.") os._exit(0) -- cgit v1.2.3