From: Arfrever Frehtes Taifersar Arahesis Date: Wed, 11 Jan 2012 03:57:23 +0000 (+0100) Subject: portage.debug.trace_handler.__init__(): Fix compatibility with Python 3. X-Git-Tag: v2.2.0_alpha85~43 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=93db7e12b01cde9f29cc404a9ca8886143f3e988;p=portage.git portage.debug.trace_handler.__init__(): Fix compatibility with Python 3. --- diff --git a/pym/portage/debug.py b/pym/portage/debug.py index ce642fef6..ebf1a138a 100644 --- a/pym/portage/debug.py +++ b/pym/portage/debug.py @@ -1,4 +1,4 @@ -# Copyright 1999-2011 Gentoo Foundation +# Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 import os @@ -26,7 +26,7 @@ class trace_handler(object): def __init__(self): python_system_paths = [] for x in sys.path: - if os.path.basename(x).startswith("python2."): + if os.path.basename(x) == "python%s.%s" % sys.version_info[:2]: python_system_paths.append(x) self.ignore_prefixes = []