From bae4e80500b552f7b3658a1a6a158fef02047f58 Mon Sep 17 00:00:00 2001 From: Sébastien Dailly Date: Wed, 7 May 2025 11:31:20 +0200 Subject: Remove the existing handler (and unused) in socketserver --- win32.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'win32.py') diff --git a/win32.py b/win32.py index 1b45a95..c1b0ae3 100644 --- a/win32.py +++ b/win32.py @@ -1,6 +1,6 @@ -# Required for the window title name from ctypes import wintypes, windll, create_unicode_buffer, WINFUNCTYPE from typing import Optional, Dict +import sys from zope import interface from interfaces import desktopEvent @@ -113,8 +113,8 @@ class Listener(object): # Fatal Python error: PyEval_RestoreThread: the function must be # called with the GIL held, but the GIL is released (the current # Python thread state is NULL) - print("Mapping '%s' to default" % title) - component.handle(Mapping((default, None))) + print(f"Mapping '{title}' to default") + component.handle(Mapping(("default", None))) def start(self) -> None: self.hookIDs = [setHook(self.WinEventProc, et) for et in eventTypes.keys()] -- cgit v1.2.3