diff options
Diffstat (limited to 'xattr/__init__.py')
-rw-r--r-- | xattr/__init__.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/xattr/__init__.py b/xattr/__init__.py index dad8e5a..57a771e 100644 --- a/xattr/__init__.py +++ b/xattr/__init__.py @@ -9,6 +9,7 @@ that exposes these extended attributes. __version__ = '0.8.0' +from .compat import integer_types from .lib import (XATTR_NOFOLLOW, XATTR_CREATE, XATTR_REPLACE, XATTR_NOSECURITY, XATTR_MAXNAMELEN, XATTR_FINDERINFO_NAME, XATTR_RESOURCEFORK_NAME, _getxattr, _fgetxattr, _setxattr, _fsetxattr, @@ -46,14 +47,14 @@ class xattr(object): self.value = obj def __repr__(self): - if isinstance(self.value, int): + if isinstance(self.value, integer_types): flavor = "fd" else: flavor = "file" return "<%s %s=%r>" % (type(self).__name__, flavor, self.value) def _call(self, name_func, fd_func, *args): - if isinstance(self.value, int): + if isinstance(self.value, integer_types): return fd_func(self.value, *args) else: return name_func(self.value, *args) |