From 13f2993cf131346701d618d641fba810f069ffc8 Mon Sep 17 00:00:00 2001 From: hakril Date: Thu, 6 Feb 2025 21:59:44 +0100 Subject: [PATCH] Fix tests for older python --- tests/test_syswow.py | 20 ++++++++++---------- windows/native_exec/simple_arm64.py | 1 + 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/tests/test_syswow.py b/tests/test_syswow.py index 248c383..5d214d8 100644 --- a/tests/test_syswow.py +++ b/tests/test_syswow.py @@ -14,22 +14,22 @@ def test_print_syswow_state(): import platform print("") env = windows.system.environ - print(f"{platform.machine()=}") - print(f"{platform.architecture()=}") - print(f"{windows.system.bitness=}") - print(f"{windows.system.architecture=}") - print(f"{windows.current_process.bitness=}") - print(f"{windows.current_process.architecture=}") - print(f"{env['PROCESSOR_ARCHITECTURE']=}") - print(f"{env.get('PROCESSOR_ARCHITEW6432')=}") + print("platform.machine()={0}".format(platform.machine())) + print("platform.architecture()={0}".format(platform.architecture())) + print("windows.system.bitness={0}".format(windows.system.bitness)) + print("windows.system.architecture={0}".format(windows.system.architecture)) + print("windows.current_process.bitness={0}".format(windows.current_process.bitness)) + print("windows.current_process.architecture={0}".format(windows.current_process.architecture)) + print("env['PROCESSOR_ARCHITECTURE']={0}".format(env['PROCESSOR_ARCHITECTURE'])) + print("env.get('PROCESSOR_ARCHITEW6432')={0}".format(env.get('PROCESSOR_ARCHITEW6432'))) print("") print("IsWow64Process2") processMachine = gdef.USHORT() nativeMachine = gdef.USHORT() windows.winproxy.IsWow64Process2(windows.current_process.handle, processMachine, nativeMachine) - print(f"{hex(processMachine.value)=}") - print(f"{hex(nativeMachine.value)=}") + print("hex(processMachine.value)={0}".format(hex(processMachine.value))) + print("hex(nativeMachine.value)={0}".format(hex(nativeMachine.value))) @process_syswow_only diff --git a/windows/native_exec/simple_arm64.py b/windows/native_exec/simple_arm64.py index 6ecfc4d..d767473 100644 --- a/windows/native_exec/simple_arm64.py +++ b/windows/native_exec/simple_arm64.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- import sys import collections import struct