Workaround for odd problem on my machine: without this I get a traceback

if I hit enter instead of return upon file selection.
This commit is contained in:
Just van Rossum 2001-10-31 22:58:23 +00:00
parent ab57c7dcfc
commit 67050d2d64
1 changed files with 5 additions and 1 deletions

View File

@ -46,7 +46,11 @@ def _PromptGetFile(prompt, *typelist):
good = 0
fss = macfs.FSSpec(':cancelled')
else:
fss = rr.selection[0]
if rr.selection:
fss = rr.selection[0]
else:
fss = None
good = 0
## if typehandle:
## typehandle.DisposeHandle()
return fss, good