Updating external_url_handler example to Python 3 (#3816)

This commit is contained in:
Sebastian Höffner 2020-10-29 17:33:20 +01:00 committed by GitHub
parent 070a0c1c75
commit 5d60cce242
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -239,7 +239,7 @@ def url_for(endpoint, **values):
# Re-raise the BuildError, in context of original traceback.
exc_type, exc_value, tb = sys.exc_info()
if exc_value is error:
raise exc_type, exc_value, tb
raise exc_type(exc_value).with_traceback(tb)
else:
raise error
# url_for will use this result, instead of raising BuildError.