From: Victor Stinner Date: Tue, 22 Mar 2011 00:22:27 +0000 (+0100) Subject: Issue #3080: On DJGPP, case_bytes() returns -1 to signal an error if the file X-Git-Tag: v3.3.0a1~2802 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9c61e24be47d27941ebd5c639fa3fce47e26f00b;p=thirdparty%2FPython%2Fcpython.git Issue #3080: On DJGPP, case_bytes() returns -1 to signal an error if the file cannot be found. --- diff --git a/Python/import.c b/Python/import.c index abc390671980..3b8ce931d9e3 100644 --- a/Python/import.c +++ b/Python/import.c @@ -2084,7 +2084,7 @@ case_bytes(char *buf, Py_ssize_t len, Py_ssize_t namelen, const char *name) PyErr_Format(PyExc_NameError, "Can't find file for module %.100s\n(filename %.300s)", name, buf); - return 0; + return -1; } return strncmp(ffblk.ff_name, name, namelen) == 0;