From 0a83efdca21ef35da38e9cc8e08ffe4b9f9ae08e Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Tue, 17 Aug 2010 06:54:42 -0700 Subject: Write compiled bytecodes to /dev/null, rather than write and unlink them. --- pym/portage/tests/lint/test_compile_modules.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/pym/portage/tests/lint/test_compile_modules.py b/pym/portage/tests/lint/test_compile_modules.py index 5b86fcfb2..273979b89 100644 --- a/pym/portage/tests/lint/test_compile_modules.py +++ b/pym/portage/tests/lint/test_compile_modules.py @@ -51,13 +51,4 @@ class CompileModulesTestCase(TestCase): cfile = imp.cache_from_source(cfile) except AttributeError: cfile += (__debug__ and 'c' or 'o') - py_compile.compile(x, cfile=cfile, doraise=True) - os.unlink(cfile) - cfile_parent_dir = os.path.dirname(cfile) - if os.path.basename(cfile_parent_dir) == '__pycache__': - # Python >=3.2 - try: - os.rmdir(cfile_parent_dir) - except OSError: - # __pycache__ directory is non-empty. - pass + py_compile.compile(x, cfile='/dev/null', doraise=True) -- cgit v1.2.3-1-g7c22