From: Zac Medico Date: Wed, 11 Mar 2009 06:28:02 +0000 (-0000) Subject: Open the temp file in text mode for py3k compatibility. (trunk r12726) X-Git-Tag: v2.1.6.8~101 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=41b24444d3965ab5a01734b4390c4fd56ec6c41a;p=portage.git Open the temp file in text mode for py3k compatibility. (trunk r12726) svn path=/main/branches/2.1.6/; revision=12976 --- 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: