mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 17:33:54 +00:00
Merge pull request #23978 from kaithar/issue/re-raise_preserving_context
Instead of raising the exception() instance, raise from exc_info()
This commit is contained in:
commit
033cc83b1b
@ -577,8 +577,12 @@ class Minion(MinionBase):
|
||||
# finish connecting to master
|
||||
self._connect_master_future.add_done_callback(lambda f: self.io_loop.stop())
|
||||
self.io_loop.start()
|
||||
if self._connect_master_future.exception():
|
||||
raise self._connect_master_future.exception()
|
||||
# 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()
|
||||
if future_exception:
|
||||
raise six.reraise(*future_exception)
|
||||
|
||||
@tornado.gen.coroutine
|
||||
def connect_master(self):
|
||||
|
Loading…
Reference in New Issue
Block a user