From: Zac Medico Date: Fri, 27 Feb 2009 03:46:40 +0000 (-0000) Subject: Open the temp file in text mode for py3k compatibility. X-Git-Tag: v2.2_rc24~92 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=223c15a9ceb5aca07ed52142250fa851c381fb21;p=portage.git Open the temp file in text mode for py3k compatibility. svn path=/main/trunk/; revision=12723 --- 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)