summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-02-27 04:11:03 +0000
committerZac Medico <zmedico@gentoo.org>2009-02-27 04:11:03 +0000
commitaf99fbfe536f554b74a51dbe7a202887a361c743 (patch)
tree40bf69edcd13390f4822d9986cce2a5ee27aa805
parent047b47f00df3e6f192bfd29c53ee2939440a0770 (diff)
downloadportage-af99fbfe536f554b74a51dbe7a202887a361c743.tar.gz
portage-af99fbfe536f554b74a51dbe7a202887a361c743.tar.bz2
portage-af99fbfe536f554b74a51dbe7a202887a361c743.zip
Open the temp file in text mode for py3k compatibility.
svn path=/main/trunk/; revision=12726
-rw-r--r--pym/portage/tests/news/test_NewsItem.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/pym/portage/tests/news/test_NewsItem.py b/pym/portage/tests/news/test_NewsItem.py
index f6c59e6a2..f4a073504 100644
--- a/pym/portage/tests/news/test_NewsItem.py
+++ b/pym/portage/tests/news/test_NewsItem.py
@@ -56,8 +56,8 @@ The revdep-rebuild tool is provided by app-portage/gentoolkit.
tmpItem = self.fakeItem[:].replace("#Display-If-Profile:", "Display-If-Profile: %s" %
self.profile)
+ item = self._processItem(tmpItem)
try:
- item = self._processItem(tmpItem)
self.assertTrue(item.isRelevant(self.vardb, self.settings, self.profile),
msg="Expected %s to be relevant, but it was not!" % tmpItem)
finally:
@@ -88,9 +88,9 @@ The revdep-rebuild tool is provided by app-portage/gentoolkit.
def _processItem(self, item):
filename = None
fd, filename = mkstemp()
- f = os.fdopen(fd, 'wb')
+ f = os.fdopen(fd, 'w')
f.write(item)
- f.close
+ f.close()
try:
return NewsItem(filename, 0)
except TypeError: