diff --git a/Lib/plat-mac/EasyDialogs.py b/Lib/plat-mac/EasyDialogs.py index 4c64839ed2c..bd097bd8366 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 c05f8cfd4e8..03cc72713fa 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 -----------