From: Jack Jansen Date: Wed, 5 Mar 2003 21:16:06 +0000 (+0000) Subject: Two ancient and obscure bugs found and fixed by Donovan Preston (these X-Git-Tag: v2.3c1~1577 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5b7338519507e984778355d1628ec65bfa59bb39;p=thirdparty%2FPython%2Fcpython.git Two ancient and obscure bugs found and fixed by Donovan Preston (these could be responsible for various unexplained problems with Python/OSA interaction over the years): - Enum values were passed as their string counterparts. Most applications don't seem to mind this, but some do (InDesign). - Attributes have never worked (!), as they were incorrectly passed as parameters. Apparently nobody uses them much:-) --- diff --git a/Lib/plat-mac/aetools.py b/Lib/plat-mac/aetools.py index 79d69589a670..8ac293d642d3 100644 --- a/Lib/plat-mac/aetools.py +++ b/Lib/plat-mac/aetools.py @@ -92,7 +92,7 @@ def packevent(ae, parameters = {}, attributes = {}): for key, value in parameters.items(): packkey(ae, key, value) for key, value in attributes.items(): - packkey(ae, key, value) + ae.AEPutAttributeDesc(key, pack(value)) # # Support routine for automatically generated Suite interfaces @@ -116,7 +116,7 @@ def enumsubst(arguments, key, edict): v = arguments[key] ok = edict.values() if edict.has_key(v): - arguments[key] = edict[v] + arguments[key] = Enum(edict[v]) elif not v in ok: raise TypeError, 'Unknown enumerator: %s'%v