Merge pull request #46732 from rallytime/bp-46032

Back-port #46032 to 2017.7
This commit is contained in:
Nicole Thomas 2018-03-28 09:43:16 -04:00 committed by GitHub
commit 1222bdbc00
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -43,7 +43,12 @@ def _handle_interrupt(exc, original_exc, hardfail=False, trace=''):
def _handle_signals(client, signum, sigframe):
trace = traceback.format_exc()
try:
# This raises AttributeError on Python 3.4 and 3.5 if there is no current exception.
# Ref: https://bugs.python.org/issue23003
trace = traceback.format_exc()
except AttributeError:
trace = ''
try:
hardcrash = client.options.hard_crash
except (AttributeError, KeyError):