diff Python/import.c @ 42688:62eee79de923 legacy-trunk

Revert accidental checkins from last commit.
author Georg Brandl <georg@python.org>
date Tue, 21 Aug 2007 06:03:43 +0000
parents ee9ebbf5f3dc
children 9087337f3a3f
line wrap: on
line diff
--- a/Python/import.c	Tue Aug 21 06:01:18 2007 +0000
+++ b/Python/import.c	Tue Aug 21 06:03:43 2007 +0000
@@ -1395,7 +1395,6 @@
 			filemode = fdp->mode;
 			if (filemode[0] == 'U')
 				filemode = "r" PY_STDIOTEXTMODE;
-			errno = 0;
 			fp = fopen(buf, filemode);
 			if (fp != NULL) {
 				if (case_ok(buf, len, namelen, name))
@@ -1405,15 +1404,6 @@
 					fp = NULL;
 				}
 			}
-			/* issue a warning if the file is there */
-			/*if (errno != ENOENT) {
-				char warnstr[MAXPATHLEN+80];
-				sprintf(warnstr, "Not importing '%.*s': ");
-				
-				if (PyErr_Warn(PyExc_ImportWarning,
-					       warnstr)) {
-
-			}*/
 #if defined(PYOS_OS2)
 			/* restore the saved snapshot */
 			strcpy(buf, saved_buf);