[Python-checkins] python/dist/src/Lib/plat-mac aetools.py,1.2,1.3

jackjansen@users.sourceforge.net jackjansen@users.sourceforge.net
Wed, 05 Mar 2003 13:16:13 -0800


Update of /cvsroot/python/python/dist/src/Lib/plat-mac
In directory sc8-pr-cvs1:/tmp/cvs-serv22404

Modified Files:
	aetools.py 
Log Message:
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:-)


Index: aetools.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/plat-mac/aetools.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** aetools.py	26 Feb 2003 15:28:17 -0000	1.2
--- aetools.py	5 Mar 2003 21:16:06 -0000	1.3
***************
*** 93,97 ****
  		packkey(ae, key, value)
  	for key, value in attributes.items():
! 		packkey(ae, key, value)
  
  #
--- 93,97 ----
  		packkey(ae, key, value)
  	for key, value in attributes.items():
! 		ae.AEPutAttributeDesc(key, pack(value))
  
  #
***************
*** 117,121 ****
  	ok = edict.values()
  	if edict.has_key(v):
! 		arguments[key] = edict[v]
  	elif not v in ok:
  		raise TypeError, 'Unknown enumerator: %s'%v
--- 117,121 ----
  	ok = edict.values()
  	if edict.has_key(v):
! 		arguments[key] = Enum(edict[v])
  	elif not v in ok:
  		raise TypeError, 'Unknown enumerator: %s'%v