diff options
author | robot-piglet <robot-piglet@yandex-team.com> | 2024-08-25 12:54:32 +0300 |
---|---|---|
committer | robot-piglet <robot-piglet@yandex-team.com> | 2024-08-25 13:03:33 +0300 |
commit | 4a64a813e1d34e732f35d8a65147974f76395a6f (patch) | |
tree | a8da0dede5213f85e45b95047cfbdcf5427cf0b7 /contrib/python/Twisted/py3/twisted/internet/_baseprocess.py | |
parent | e9bbee265681b79a9ef9795bdc84cf6996f9cfec (diff) | |
download | ydb-4a64a813e1d34e732f35d8a65147974f76395a6f.tar.gz |
Intermediate changes
Diffstat (limited to 'contrib/python/Twisted/py3/twisted/internet/_baseprocess.py')
-rw-r--r-- | contrib/python/Twisted/py3/twisted/internet/_baseprocess.py | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/contrib/python/Twisted/py3/twisted/internet/_baseprocess.py b/contrib/python/Twisted/py3/twisted/internet/_baseprocess.py index 83bc08fdc0b..142273143ae 100644 --- a/contrib/python/Twisted/py3/twisted/internet/_baseprocess.py +++ b/contrib/python/Twisted/py3/twisted/internet/_baseprocess.py @@ -9,11 +9,13 @@ L{IReactorProcess} implementations. from typing import Optional +from twisted.logger import Logger from twisted.python.deprecate import getWarningMethod from twisted.python.failure import Failure -from twisted.python.log import err from twisted.python.reflect import qual +_log = Logger() + _missingProcessExited = ( "Since Twisted 8.2, IProcessProtocol.processExited " "is required. %s must implement it." @@ -39,10 +41,8 @@ class BaseProcess: stacklevel=0, ) else: - try: + with _log.failuresHandled("while calling processExited:"): processExited(Failure(reason)) - except BaseException: - err(None, "unexpected error in processExited") def processEnded(self, status): """ @@ -62,7 +62,5 @@ class BaseProcess: reason = self._getReason(self.status) proto = self.proto self.proto = None - try: + with _log.failuresHandled("while calling processEnded:"): proto.processEnded(Failure(reason)) - except BaseException: - err(None, "unexpected error in processEnded") |