From b90e592e26da67372cb633150c49372799dc51bf Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Sun, 18 Jan 2015 13:25:49 -0500 Subject: Collect all the nudgy environment checks into coverage.env --- coverage/misc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'coverage/misc.py') diff --git a/coverage/misc.py b/coverage/misc.py index 924199e..875d904 100644 --- a/coverage/misc.py +++ b/coverage/misc.py @@ -4,8 +4,8 @@ import errno import hashlib import inspect import os -import sys +from coverage import env from coverage.backward import string_class, to_bytes @@ -154,7 +154,7 @@ def overrides(obj, method_name, base_class): # Python 2/3 compatibility: Python 2 returns an instancemethod object, the # function is the .im_func attribute. Python 3 returns a plain function # object already. - if sys.version_info < (3, 0): + if env.PY2: klass_func = klass_func.im_func base_func = base_func.im_func -- cgit v1.2.1