From 15485962d199c46934ca1d7f90b1d68f59a66ed4 Mon Sep 17 00:00:00 2001 From: Armin Ronacher <@mitsuhiko> Date: Wed, 13 Jan 2016 13:25:09 +0100 Subject: [PATCH] Restored support for Python 2.6 --- contextlib2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contextlib2.py b/contextlib2.py index a618f23..2b80384 100644 --- a/contextlib2.py +++ b/contextlib2.py @@ -250,7 +250,7 @@ class suppress: # Context manipulation is Python 3 only -_HAVE_EXCEPTION_CHAINING = sys.version_info.major >= 3 +_HAVE_EXCEPTION_CHAINING = sys.version_info[0] >= 3 if _HAVE_EXCEPTION_CHAINING: def _make_context_fixer(frame_exc): def _fix_exception_context(new_exc, old_exc):