svn path=/main/trunk/; revision=13836
# Distributed under the terms of the GNU General Public License v2
# $Id$
+import codecs
import os
import stat
from portage.localization import _
# once, which may be expensive due to digging in child classes.
func = self.lineParser
for fn in RecursiveFileLoader(self.fname):
- f = open(fn)
+ f = codecs.open(fn, mode='r', errors='replace')
for line_num, line in enumerate(f):
func(line, line_num, data, errors)
return (data, errors)