]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Under Jaguar it seems that 'errn' return value keyword parameters don't
authorJack Jansen <jack.jansen@cwi.nl>
Fri, 25 Oct 2002 20:06:29 +0000 (20:06 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Fri, 25 Oct 2002 20:06:29 +0000 (20:06 +0000)
(or don't always?) show up with missed(). I think this is a bug in
Jaguar, but as it is a potential dangerous problem (the OSA event has
failed, but the Python code isn't told about this and happily continues)
this is a quick workaround.

Bugfix candidate, I'll add it to 2.2.2 as a last second fix.

Mac/Lib/aetools.py

index 5495dfafb6a9dba0afbda4e9a1c4335352b04177..8d9657e70121760dc40b44069a3872f737db2331 100644 (file)
@@ -65,6 +65,14 @@ def unpackevent(ae, formodulename=""):
        else:
                parameters['----'] = unpack(dirobj, formodulename)
                del dirobj
+       # Workaround for what I feel is a bug in OSX 10.2: 'errn' won't show up in missed...
+       try:
+               dirobj = ae.AEGetParamDesc('errn', '****')
+       except AE.Error:
+               pass
+       else:
+               parameters['errn'] = unpack(dirobj, formodulename)
+               del dirobj
        while 1:
                key = missed(ae)
                if not key: break