Open the temp file in text mode for py3k compatibility. (trunk r12727)
authorZac Medico <zmedico@gentoo.org>
Wed, 11 Mar 2009 06:28:19 +0000 (06:28 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 11 Mar 2009 06:28:19 +0000 (06:28 -0000)
svn path=/main/branches/2.1.6/; revision=12977

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)