Merge pull request #253 from anthrotype/mac_type
[macCreatorType] return correct creator/type on Python 2.7
This commit is contained in:
commit
080f580902
@ -16,9 +16,10 @@ def _reverseString(s):
|
|||||||
def getMacCreatorAndType(path):
|
def getMacCreatorAndType(path):
|
||||||
if MacOS is not None:
|
if MacOS is not None:
|
||||||
fileCreator, fileType = MacOS.GetCreatorAndType(path)
|
fileCreator, fileType = MacOS.GetCreatorAndType(path)
|
||||||
if sys.byteorder == "little":
|
if sys.version_info[:2] < (2, 7) and sys.byteorder == "little":
|
||||||
# work around bug in MacOS.GetCreatorAndType() on intel:
|
# work around bug in MacOS.GetCreatorAndType() on intel:
|
||||||
# http://bugs.python.org/issue1594
|
# http://bugs.python.org/issue1594
|
||||||
|
# (fixed with Python 2.7)
|
||||||
fileCreator = _reverseString(fileCreator)
|
fileCreator = _reverseString(fileCreator)
|
||||||
fileType = _reverseString(fileType)
|
fileType = _reverseString(fileType)
|
||||||
return fileCreator, fileType
|
return fileCreator, fileType
|
||||||
|
Loading…
x
Reference in New Issue
Block a user