From be3804540703909ea80833081a077ee381e77581 Mon Sep 17 00:00:00 2001 From: Giampaolo Rodola Date: Thu, 4 Jan 2024 14:51:28 +0100 Subject: [PATCH] fix syntax err on win --- psutil/_pswindows.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/psutil/_pswindows.py b/psutil/_pswindows.py index 77d9140cd..2d3a0c9fd 100644 --- a/psutil/_pswindows.py +++ b/psutil/_pswindows.py @@ -575,14 +575,12 @@ def _wrap_exceptions(self): "service %r is not querable (not enough privileges)" % self._name ) - raise AccessDenied( - pid=None, name=self._name, msg=msg % self._name - ) + raise AccessDenied(pid=None, name=self._name, msg=msg) elif err.winerror in ( cext.ERROR_INVALID_NAME, cext.ERROR_SERVICE_DOES_NOT_EXIST, ): - msg = "service %r does not exist)" % self._name + msg = "service %r does not exist" % self._name raise NoSuchProcess(pid=None, name=self._name, msg=msg) else: raise