Open ld.so.conf as text (unicode).
authorZac Medico <zmedico@gentoo.org>
Wed, 5 Aug 2009 00:17:15 +0000 (00:17 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 5 Aug 2009 00:17:15 +0000 (00:17 -0000)
svn path=/main/trunk/; revision=13915

pym/portage/__init__.py

index eb7547c3044e05806323e90c33ddd8f47066f641..ca27643358117ea51aa63bc5b555c92a0200cf39 100644 (file)
@@ -726,7 +726,8 @@ def env_update(makelinks=1, target_root=None, prev_mtimes=None, contents=None,
 
        ldsoconf_path = os.path.join(target_root, "etc", "ld.so.conf")
        try:
-               myld = open(ldsoconf_path)
+               myld = codecs.open(ldsoconf_path, mode='r',
+                       encoding='utf_8', errors='replace')
                myldlines=myld.readlines()
                myld.close()
                oldld=[]