summaryrefslogtreecommitdiffstats
path: root/Lib/plat-mac
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/plat-mac')
-rw-r--r--Lib/plat-mac/aepack.py2
-rw-r--r--Lib/plat-mac/aetypes.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/Lib/plat-mac/aepack.py b/Lib/plat-mac/aepack.py
index e958b85..5f8efd2 100644
--- a/Lib/plat-mac/aepack.py
+++ b/Lib/plat-mac/aepack.py
@@ -98,7 +98,7 @@ def pack(x, forcetype = None):
return AE.AECreateDesc(b'long', struct.pack('l', x))
if isinstance(x, float):
return AE.AECreateDesc(b'doub', struct.pack('d', x))
- if isinstance(x, (bytes, buffer)):
+ if isinstance(x, (bytes, bytearray)):
return AE.AECreateDesc(b'TEXT', x)
if isinstance(x, str):
# See http://developer.apple.com/documentation/Carbon/Reference/Apple_Event_Manager/Reference/reference.html#//apple_ref/doc/constant_group/typeUnicodeText
diff --git a/Lib/plat-mac/aetypes.py b/Lib/plat-mac/aetypes.py
index d29ea97..6c031a1 100644
--- a/Lib/plat-mac/aetypes.py
+++ b/Lib/plat-mac/aetypes.py
@@ -22,7 +22,7 @@ def _four_char_code(four_chars):
four_chars must contain only ASCII characters.
"""
- if isinstance(four_chars, (bytes, buffer)):
+ if isinstance(four_chars, (bytes, bytearray)):
b = bytes(four_chars[:4])
n = len(b)
if n < 4: