summaryrefslogtreecommitdiffstats
path: root/pym/portage/cache/ebuild_xattr.py
diff options
context:
space:
mode:
Diffstat (limited to 'pym/portage/cache/ebuild_xattr.py')
-rw-r--r--pym/portage/cache/ebuild_xattr.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/pym/portage/cache/ebuild_xattr.py b/pym/portage/cache/ebuild_xattr.py
index baba94321..bcaf30640 100644
--- a/pym/portage/cache/ebuild_xattr.py
+++ b/pym/portage/cache/ebuild_xattr.py
@@ -10,6 +10,7 @@ from portage.cache import fs_template
from portage.versions import catsplit
from portage import cpv_getkey
from portage import os
+from portage import _fs_encoding
from portage import _unicode_decode
import xattr
from errno import ENODATA,ENOSPC,E2BIG
@@ -156,7 +157,11 @@ class database(fs_template.FsBased):
for root, dirs, files in os.walk(self.portdir):
for file in files:
- file = _unicode_decode(file)
+ try:
+ file = _unicode_decode(file,
+ encoding=_fs_encoding, errors='strict')
+ except UnicodeDecodeError:
+ continue
if file[-7:] == '.ebuild':
cat = os.path.basename(os.path.dirname(root))
pn_pv = file[:-7]