public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] portage r13947 - main/trunk/pym/portage/dbapi
@ 2009-08-07 21:03 Zac Medico (zmedico)
  0 siblings, 0 replies; only message in thread
From: Zac Medico (zmedico) @ 2009-08-07 21:03 UTC (permalink / raw
  To: gentoo-commits

Author: zmedico
Date: 2009-08-07 21:03:11 +0000 (Fri, 07 Aug 2009)
New Revision: 13947

Modified:
   main/trunk/pym/portage/dbapi/porttree.py
Log:
Open repo_name in text mode (unicode).


Modified: main/trunk/pym/portage/dbapi/porttree.py
===================================================================
--- main/trunk/pym/portage/dbapi/porttree.py	2009-08-07 08:47:47 UTC (rev 13946)
+++ main/trunk/pym/portage/dbapi/porttree.py	2009-08-07 21:03:11 UTC (rev 13947)
@@ -167,7 +167,8 @@
 				continue
 			repo_name_path = os.path.join(path, REPO_NAME_LOC)
 			try:
-				repo_name = open(repo_name_path, 'r').readline().strip()
+				repo_name = codecs.open(repo_name_path, mode='r',
+					encoding='utf_8', errors='replace').readline().strip()
 			except EnvironmentError:
 				# warn about missing repo_name at some other time, since we
 				# don't want to see a warning every time the portage module is




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-08-07 21:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-07 21:03 [gentoo-commits] portage r13947 - main/trunk/pym/portage/dbapi Zac Medico (zmedico)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox