From 5affd23e6f42125998724787025080a24839266e Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Wed, 5 Apr 2017 09:37:24 +0300 Subject: bpo-29762: More use "raise from None". (#569) This hides unwanted implementation details from tracebacks. --- Lib/lib2to3/refactor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Lib/lib2to3/refactor.py') diff --git a/Lib/lib2to3/refactor.py b/Lib/lib2to3/refactor.py index c5a1aa2d0c..70b2a002fb 100644 --- a/Lib/lib2to3/refactor.py +++ b/Lib/lib2to3/refactor.py @@ -248,7 +248,7 @@ class RefactoringTool(object): try: fix_class = getattr(mod, class_name) except AttributeError: - raise FixerError("Can't find %s.%s" % (fix_name, class_name)) + raise FixerError("Can't find %s.%s" % (fix_name, class_name)) from None fixer = fix_class(self.options, self.fixer_log) if fixer.explicit and self.explicit is not True and \ fix_mod_path not in self.explicit: -- cgit v1.2.1