Merge pull request #406 from anthrotype/xattr-keyerror
[macCreatorType] fix KeyError raised by old version of xattr module
This commit is contained in:
commit
7f5d5454fc
@ -21,7 +21,7 @@ def getMacCreatorAndType(path):
|
|||||||
if xattr is not None:
|
if xattr is not None:
|
||||||
try:
|
try:
|
||||||
finderInfo = xattr.getxattr(path, 'com.apple.FinderInfo')
|
finderInfo = xattr.getxattr(path, 'com.apple.FinderInfo')
|
||||||
except IOError:
|
except (KeyError, IOError):
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
fileType = Tag(finderInfo[:4])
|
fileType = Tag(finderInfo[:4])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user