From 223c15a9ceb5aca07ed52142250fa851c381fb21 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 27 Feb 2009 03:46:40 +0000 Subject: Open the temp file in text mode for py3k compatibility. svn path=/main/trunk/; revision=12723 --- pym/portage/tests/sets/files/testStaticFileSet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pym/portage/tests/sets/files/testStaticFileSet.py b/pym/portage/tests/sets/files/testStaticFileSet.py index 57a8c58cd..4c7a191b1 100644 --- a/pym/portage/tests/sets/files/testStaticFileSet.py +++ b/pym/portage/tests/sets/files/testStaticFileSet.py @@ -15,8 +15,8 @@ class StaticFileSetTestCase(TestCase): def setUp(self): fd, self.testfile = tempfile.mkstemp(suffix=".testdata", prefix=self.__class__.__name__, text=True) - os.write(fd, "\n".join(test_cps)) os.close(fd) + open(self.testfile, 'w').write("\n".join(test_cps)) def tearDown(self): os.unlink(self.testfile) -- cgit v1.2.3-1-g7c22