Fix invalid use of python's traceback.print_exc (#25743)

The exception is being interpreted as a `limit` (int) to cap the number
of stack trace entries to print.

https://docs.python.org/3/library/traceback.html#traceback.print_exc
pull/25746/head
AJ Heller 4 years ago committed by GitHub
parent 74b767d72c
commit 6ff042277e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      tools/run_tests/python_utils/check_on_pr.py

@ -65,8 +65,8 @@ def _access_token():
'exp': time.time() + 60
}
break
except (KeyError, ValueError) as e:
traceback.print_exc(e)
except (KeyError, ValueError):
traceback.print_exc()
print('HTTP Status %d %s' % (resp.status_code, resp.reason))
print("Fetch access token from Github API failed:")
print(resp.text)

Loading…
Cancel
Save