Skip to content

Commit

Permalink
If you entered a pathname for a nonexisting file to a FSSpec constructor
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jackjansen committed Dec 25, 2002
1 parent cfe2836 commit 00df3e0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Mac/Modules/file/_Filemodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
2 changes: 2 additions & 0 deletions Mac/Modules/file/filesupport.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,9 @@ def declare(self, name):
}
return 1;
}
#if !TARGET_API_MAC_OSX
PyErr_SetString(PyExc_TypeError, "FSSpec, FSRef, pathname or (refnum, parid, path) required");
#endif
return 0;
}
Expand Down

0 comments on commit 00df3e0

Please sign in to comment.