Remove no longer needed code.
authorArfrever Frehtes Taifersar Arahesis <Arfrever@Gentoo.Org>
Tue, 17 Aug 2010 15:50:56 +0000 (17:50 +0200)
committerArfrever Frehtes Taifersar Arahesis <Arfrever@Gentoo.Org>
Tue, 17 Aug 2010 15:50:56 +0000 (17:50 +0200)
pym/portage/tests/lint/test_compile_modules.py

index 273979b890dbd79084c2d64aeda6147fb22072b9..f90a6665a2d9246bbfb88f5d4d14d50324c6edc1 100644 (file)
@@ -1,7 +1,6 @@
 # Copyright 2009-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
-import imp
 import itertools
 import stat
 
@@ -31,7 +30,6 @@ class CompileModulesTestCase(TestCase):
                                if not stat.S_ISREG(st.st_mode):
                                        continue
                                do_compile = False
-                               cfile = x
                                if x[-3:] == '.py':
                                        do_compile = True
                                else:
@@ -44,11 +42,5 @@ class CompileModulesTestCase(TestCase):
                                        if line[:2] == '#!' and \
                                                'python' in line:
                                                do_compile = True
-                                               cfile += '.py'
                                if do_compile:
-                                       try:
-                                               # Python >=3.2
-                                               cfile = imp.cache_from_source(cfile)
-                                       except AttributeError:
-                                               cfile += (__debug__ and 'c' or 'o')
                                        py_compile.compile(x, cfile='/dev/null', doraise=True)