From: Ronald Oussoren Date: Fri, 2 Jan 2009 14:52:09 +0000 (+0000) Subject: Fix for issue r1737832 X-Git-Tag: v2.7a1~2426 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=919697cefe91af067d46f5971048067403ffdc05;p=thirdparty%2FPython%2Fcpython.git Fix for issue r1737832 --- diff --git a/Lib/plat-mac/EasyDialogs.py b/Lib/plat-mac/EasyDialogs.py index 4c64839ed2c8..bd097bd83666 100644 --- a/Lib/plat-mac/EasyDialogs.py +++ b/Lib/plat-mac/EasyDialogs.py @@ -573,7 +573,7 @@ def GetArgv(optionlist=None, commandlist=None, addoldfile=1, addnewfile=1, addfo del d def _process_Nav_args(dftflags, **args): - import aepack + import Carbon.AppleEvents import Carbon.AE import Carbon.File for k in args.keys(): @@ -585,11 +585,14 @@ def _process_Nav_args(dftflags, **args): if args.has_key('defaultLocation') and \ not isinstance(args['defaultLocation'], Carbon.AE.AEDesc): defaultLocation = args['defaultLocation'] - if isinstance(defaultLocation, (Carbon.File.FSSpec, Carbon.File.FSRef)): - args['defaultLocation'] = aepack.pack(defaultLocation) + if isinstance(defaultLocation, Carbon.File.FSSpec): + args['defaultLocation'] = Carbon.AE.AECreateDesc( + Carbon.AppleEvents.typeFSS, defaultLocation.data) else: - defaultLocation = Carbon.File.FSRef(defaultLocation) - args['defaultLocation'] = aepack.pack(defaultLocation) + if not isinstance(defaultLocation, Carbon.File.FSRef): + defaultLocation = Carbon.File.FSRef(defaultLocation) + args['defaultLocation'] = Carbon.AE.AECreateDesc( + Carbon.AppleEvents.typeFSRef, defaultLocation.data) if args.has_key('typeList') and not isinstance(args['typeList'], Carbon.Res.ResourceType): typeList = args['typeList'][:] # Workaround for OSX typeless files: diff --git a/Misc/NEWS b/Misc/NEWS index c05f8cfd4e8d..03cc72713faa 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -232,6 +232,9 @@ Library - Issue #16278952: plat-mac/videoreader.py now correctly imports MediaDescr +- Issue #1737832 : plat-mac/EasyDialog.py no longer uses the broken aepack + module. + Tools/Demos -----------