Skip to content

Commit

Permalink
fix syntax err on win
Browse files Browse the repository at this point in the history
  • Loading branch information
giampaolo committed Jan 4, 2024
1 parent 63c3f8b commit be38045
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions psutil/_pswindows.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit be38045

Please sign in to comment.