[macCreatorType] fix KeyError raised by old version of xattr module
in version 0.6.4 (installed on OS X 10.10 python lib/extras) it raises KeyError, whereas in the latest version available fom PyPI (v0.7.8) it raises IOError. Fixes issue in https://github.com/googlei18n/nototools/issues/113
This commit is contained in:
parent
75d4805256
commit
f10cb1f17d
@ -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])
|
||||
|
Loading…
x
Reference in New Issue
Block a user