Merge pull request #406 from anthrotype/xattr-keyerror

[macCreatorType] fix KeyError raised by old version of xattr module
This commit is contained in:
Cosimo Lupo 2015-11-11 00:06:54 +00:00
commit 7f5d5454fc

View File

@ -21,7 +21,7 @@ def getMacCreatorAndType(path):
if xattr is not None:
try:
finderInfo = xattr.getxattr(path, 'com.apple.FinderInfo')
except IOError:
except (KeyError, IOError):
pass
else:
fileType = Tag(finderInfo[:4])