diff options
Diffstat (limited to 'pym/portage/dbapi/vartree.py')
-rw-r--r-- | pym/portage/dbapi/vartree.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py index ec9813197..90fe4317c 100644 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@ -897,7 +897,7 @@ class vardbapi(dbapi): returnme = [] for x in dir_list: if not isinstance(x, unicode): - x = unicode(x, errors='replace') + x = unicode(x, encoding='utf_8', errors='replace') if self._excluded_dirs.match(x) is not None: continue ps = pkgsplit(x) @@ -930,7 +930,8 @@ class vardbapi(dbapi): def listdir(p, **kwargs): try: return [isinstance(x, unicode) and x or \ - unicode(x, errors='replace') for x in os.listdir(p) \ + unicode(x, encoding='utf_8', errors='replace') \ + for x in os.listdir(p) \ if os.path.isdir(os.path.join(p, x))] except EnvironmentError, e: if e.errno == PermissionDenied.errno: |