mirror of
https://github.com/python/cpython.git
synced 2025-07-07 19:35:27 +00:00
bpo-29762: More use "raise from None". (#569)
This hides unwanted implementation details from tracebacks.
This commit is contained in:
parent
43ba8861e0
commit
5affd23e6f
30 changed files with 50 additions and 48 deletions
|
@ -2079,7 +2079,7 @@ def restore(delta, which):
|
|||
tag = {1: "- ", 2: "+ "}[int(which)]
|
||||
except KeyError:
|
||||
raise ValueError('unknown delta choice (must be 1 or 2): %r'
|
||||
% which)
|
||||
% which) from None
|
||||
prefixes = (" ", tag)
|
||||
for line in delta:
|
||||
if line[:2] in prefixes:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue