diff options
author | Just van Rossum <just@letterror.com> | 2001-10-31 22:58:23 (GMT) |
---|---|---|
committer | Just van Rossum <just@letterror.com> | 2001-10-31 22:58:23 (GMT) |
commit | 67050d2d64558e46c63d4538b06653e7165a28c6 (patch) | |
tree | 458c0ce6b042e3150a64400f377beb1c7c8a3f7a /Mac | |
parent | ab57c7dcfc684d6f10468f6dc88dfa1b24ea967f (diff) | |
download | cpython-67050d2d64558e46c63d4538b06653e7165a28c6.zip cpython-67050d2d64558e46c63d4538b06653e7165a28c6.tar.gz cpython-67050d2d64558e46c63d4538b06653e7165a28c6.tar.bz2 |
Workaround for odd problem on my machine: without this I get a traceback
if I hit enter instead of return upon file selection.
Diffstat (limited to 'Mac')
-rw-r--r-- | Mac/Lib/macfsn.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Mac/Lib/macfsn.py b/Mac/Lib/macfsn.py index c496903..e7eeacd 100644 --- a/Mac/Lib/macfsn.py +++ b/Mac/Lib/macfsn.py @@ -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 |