From fec197de5aa3bf238472562f0569e52cf978477f Mon Sep 17 00:00:00 2001 From: Cosimo Lupo Date: Tue, 28 Apr 2015 16:37:59 +0100 Subject: [PATCH] [macCreatorType] apply workaround only for python 2.6 --- Lib/fontTools/misc/macCreatorType.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Lib/fontTools/misc/macCreatorType.py b/Lib/fontTools/misc/macCreatorType.py index 5f2e18aaf..deebf3b9b 100644 --- a/Lib/fontTools/misc/macCreatorType.py +++ b/Lib/fontTools/misc/macCreatorType.py @@ -16,9 +16,10 @@ def _reverseString(s): def getMacCreatorAndType(path): if MacOS is not None: 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: # http://bugs.python.org/issue1594 + # (fixed with Python 2.7) fileCreator = _reverseString(fileCreator) fileType = _reverseString(fileType) return fileCreator, fileType