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

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

index e4f9e4252b40604a961969af496542c3ba8abf7b..d8938d8c5d34bfeb936956c80c5dd9a37b7a2cd2 100644 (file)
@@ -29,7 +29,7 @@ class PortageModulesFileTestCase(TestCase):
 
        def BuildFile(self):
                fd, self.fname = mkstemp()
-               f = os.fdopen(fd, 'wb')
+               f = os.fdopen(fd, 'w')
                for k, v in self.items.iteritems():
                        f.write('%s=%s\n' % (k,v))
                f.close()