diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2017-04-05 06:37:24 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-05 06:37:24 (GMT) |
commit | 5affd23e6f42125998724787025080a24839266e (patch) | |
tree | 8b7ca82362e78a32805b117d574082d512251d3c /Tools/pynche | |
parent | 43ba8861e0ad044efafa46a7cc04e12ac5df640e (diff) | |
download | cpython-5affd23e6f42125998724787025080a24839266e.zip cpython-5affd23e6f42125998724787025080a24839266e.tar.gz cpython-5affd23e6f42125998724787025080a24839266e.tar.bz2 |
bpo-29762: More use "raise from None". (#569)
This hides unwanted implementation details from tracebacks.
Diffstat (limited to 'Tools/pynche')
-rw-r--r-- | Tools/pynche/ColorDB.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Tools/pynche/ColorDB.py b/Tools/pynche/ColorDB.py index 0348148..eb76d40 100644 --- a/Tools/pynche/ColorDB.py +++ b/Tools/pynche/ColorDB.py @@ -87,7 +87,7 @@ class ColorDB: try: return self.__byrgb[rgbtuple] except KeyError: - raise BadColor(rgbtuple) + raise BadColor(rgbtuple) from None def find_byname(self, name): """Return (red, green, blue) for name""" @@ -95,7 +95,7 @@ class ColorDB: try: return self.__byname[name] except KeyError: - raise BadColor(name) + raise BadColor(name) from None def nearest(self, red, green, blue): """Return the name of color nearest (red, green, blue)""" @@ -128,7 +128,7 @@ class ColorDB: try: name, aliases = self.__byrgb[(red, green, blue)] except KeyError: - raise BadColor((red, green, blue)) + raise BadColor((red, green, blue)) from None return [name] + aliases |