Open the temp file in text mode for py3k compatibility.
authorZac Medico <zmedico@gentoo.org>
Fri, 27 Feb 2009 03:46:40 +0000 (03:46 -0000)
committerZac Medico <zmedico@gentoo.org>
Fri, 27 Feb 2009 03:46:40 +0000 (03:46 -0000)
svn path=/main/trunk/; revision=12723

pym/portage/tests/sets/files/testStaticFileSet.py

index 57a8c58cd5dad6600c671ec4a9a4264d942c6605..4c7a191b1050c0fa27afca623fb2883fe01f0a7d 100644 (file)
@@ -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)