diff options
-rw-r--r-- | pym/portage/env/loaders.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pym/portage/env/loaders.py b/pym/portage/env/loaders.py index 31d3b09aa..7cd2600ae 100644 --- a/pym/portage/env/loaders.py +++ b/pym/portage/env/loaders.py @@ -3,6 +3,7 @@ # Distributed under the terms of the GNU General Public License v2 # $Id$ +import codecs import os import stat from portage.localization import _ @@ -138,7 +139,7 @@ class FileLoader(DataLoader): # 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) |