mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #47363 from DSRCorporation/bugs/replace_exc_info_with_exception
Tornado5.0: Future.exc_info is dropped
This commit is contained in:
commit
bcc66dd9bf
3 changed files with 6 additions and 6 deletions
|
@ -1057,7 +1057,7 @@ class Minion(MinionBase):
|
|||
# I made the following 3 line oddity to preserve traceback.
|
||||
# Please read PR #23978 before changing, hopefully avoiding regressions.
|
||||
# Good luck, we're all counting on you. Thanks.
|
||||
future_exception = self._connect_master_future.exc_info()
|
||||
future_exception = self._connect_master_future.exception()
|
||||
if future_exception:
|
||||
# This needs to be re-raised to preserve restart_on_error behavior.
|
||||
raise six.reraise(*future_exception)
|
||||
|
|
|
@ -296,7 +296,7 @@ class IPCClient(object):
|
|||
else:
|
||||
if hasattr(self, '_connecting_future'):
|
||||
# read previous future result to prevent the "unhandled future exception" error
|
||||
self._connecting_future.exc_info() # pylint: disable=E0203
|
||||
self._connecting_future.exception() # pylint: disable=E0203
|
||||
future = tornado.concurrent.Future()
|
||||
self._connecting_future = future
|
||||
self._connect(timeout=timeout)
|
||||
|
@ -753,9 +753,9 @@ class IPCMessageSubscriber(IPCClient):
|
|||
# '[ERROR ] Future exception was never retrieved:
|
||||
# StreamClosedError'
|
||||
if self._read_sync_future is not None:
|
||||
self._read_sync_future.exc_info()
|
||||
self._read_sync_future.exception()
|
||||
if self._read_stream_future is not None:
|
||||
self._read_stream_future.exc_info()
|
||||
self._read_stream_future.exception()
|
||||
|
||||
def __del__(self):
|
||||
if IPCMessageSubscriber in globals():
|
||||
|
|
|
@ -886,7 +886,7 @@ class SaltMessageClient(object):
|
|||
# This happens because the logic is always waiting to read
|
||||
# the next message and the associated read future is marked
|
||||
# 'StreamClosedError' when the stream is closed.
|
||||
self._read_until_future.exc_info()
|
||||
self._read_until_future.exception()
|
||||
if (not self._stream_return_future.done() and
|
||||
self.io_loop != tornado.ioloop.IOLoop.current(
|
||||
instance=False)):
|
||||
|
@ -1139,7 +1139,7 @@ class Subscriber(object):
|
|||
# This happens because the logic is always waiting to read
|
||||
# the next message and the associated read future is marked
|
||||
# 'StreamClosedError' when the stream is closed.
|
||||
self._read_until_future.exc_info()
|
||||
self._read_until_future.exception()
|
||||
|
||||
def __del__(self):
|
||||
self.close()
|
||||
|
|
Loading…
Add table
Reference in a new issue