summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwedi <code@dirk-weise.de>2014-03-03 17:47:11 +0100
committerwedi <code@dirk-weise.de>2014-03-03 17:47:11 +0100
commit26d394952063d95e35a020d7ee29910f2f8b93b6 (patch)
treef16e72ab80935f5b5c45fe992bcdb7441613c0b6
parent1e1652b55a4e1037f03696a620721f567d1f7024 (diff)
downloadxattr-26d394952063d95e35a020d7ee29910f2f8b93b6.tar.gz
Python3 rework: replace unicode() with str.decode()
-rw-r--r--xattr/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/xattr/__init__.py b/xattr/__init__.py
index a36d8f1..f10f781 100644
--- a/xattr/__init__.py
+++ b/xattr/__init__.py
@@ -89,13 +89,13 @@ class xattr(object):
def list(self, options=0):
"""
Retrieves the extended attributes currently set as a list
- of unicode strings. Raises ``IOError`` on failure.
+ of strings. Raises ``IOError`` on failure.
See x-man-page://2/listxattr for options and possible errors.
"""
res = self._call(_listxattr, _flistxattr, options | self.options).split(b'\x00')
res.pop()
- return [unicode(s, 'utf-8') for s in res]
+ return [s.decode('utf-8') for s in res]
# dict-like methods