summaryrefslogtreecommitdiffstats
path: root/Mac/Modules/file/filesupport.py
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2002-12-25 22:45:28 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2002-12-25 22:45:28 (GMT)
commit00df3e052b25f3de574dd09b4912604ea45c2688 (patch)
treebeb1ba52c5e22385f2fb6c9c1e763dff7bc27b1f /Mac/Modules/file/filesupport.py
parentcfe28362fb9b7732e8781e8af7ed923a8ac8d517 (diff)
downloadcpython-00df3e052b25f3de574dd09b4912604ea45c2688.zip
cpython-00df3e052b25f3de574dd09b4912604ea45c2688.tar.gz
cpython-00df3e052b25f3de574dd09b4912604ea45c2688.tar.bz2
If you entered a pathname for a nonexisting file to a FSSpec constructor
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.
Diffstat (limited to 'Mac/Modules/file/filesupport.py')
-rw-r--r--Mac/Modules/file/filesupport.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Mac/Modules/file/filesupport.py b/Mac/Modules/file/filesupport.py
index 7238e88..ffe6c0e 100644
--- a/Mac/Modules/file/filesupport.py
+++ b/Mac/Modules/file/filesupport.py
@@ -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;
}