From: Zac Medico Date: Tue, 17 Aug 2010 13:54:42 +0000 (-0700) Subject: Write compiled bytecodes to /dev/null, rather than write and unlink X-Git-Tag: v2.2_rc68~129 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=0a83efdca21ef35da38e9cc8e08ffe4b9f9ae08e;p=portage.git Write compiled bytecodes to /dev/null, rather than write and unlink them. --- 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)