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

pym/portage/tests/env/config/test_PackageUseFile.py

index f6eb38846c941af281fe291eeac7f427485ad146..aa18364a0a2a1c3e35e1878db132c880431b18de 100644 (file)
@@ -30,10 +30,9 @@ class PackageUseFileTestCase(TestCase):
 
        def BuildFile(self):
                fd, self.fname = mkstemp()
-               f = os.fdopen(fd, 'wb')
+               f = os.fdopen(fd, 'w')
                f.write("%s %s" % (self.cpv, ' '.join(self.useflags)))
                f.close()
        
        def NukeFile(self):
-               import os
                os.unlink(self.fname)