]> granicus.if.org Git - python/commitdiff
If you entered a pathname for a nonexisting file to a FSSpec constructor
authorJack Jansen <jack.jansen@cwi.nl>
Wed, 25 Dec 2002 22:45:28 +0000 (22:45 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Wed, 25 Dec 2002 22:45:28 +0000 (22:45 +0000)
on OSX then the actual error (file not found) was obscured by the
error message that tried to be helpful about the allowed arguments. Fixed.

Mac/Modules/file/_Filemodule.c
Mac/Modules/file/filesupport.py

index 70a8720abca51bf718d7148a5e79db1e8d2c445a..0df4c2ec1766700e355ea5b0774ca1959b7a39a9 100644 (file)
@@ -2671,7 +2671,9 @@ PyMac_GetFSSpec(PyObject *v, FSSpec *spec)
                }
                return 1;
        }
+#if !TARGET_API_MAC_OSX
        PyErr_SetString(PyExc_TypeError, "FSSpec, FSRef, pathname or (refnum, parid, path) required");
+#endif
        return 0;
 }
 
index 7238e8878257a59f448b0095617f7655da8e4e82..ffe6c0ee2703516db0499a2a09d9263624ab70ae 100644 (file)
@@ -195,7 +195,9 @@ PyMac_GetFSSpec(PyObject *v, FSSpec *spec)
                }
                return 1;
        }
+#if !TARGET_API_MAC_OSX
        PyErr_SetString(PyExc_TypeError, "FSSpec, FSRef, pathname or (refnum, parid, path) required");
+#endif
        return 0;
 }