[Python-checkins] r84421 - python/branches/import_unicode/Python/import.c

victor.stinner python-checkins at python.org
Thu Sep 2 00:14:22 CEST 2010


Author: victor.stinner
Date: Thu Sep 2 00:14:22 2010
New Revision: 84421
Log:
write_compiled_module() uses PySys_FormatStderr()
Modified:
 python/branches/import_unicode/Python/import.c
Modified: python/branches/import_unicode/Python/import.c
==============================================================================
--- python/branches/import_unicode/Python/import.c	(original)
+++ python/branches/import_unicode/Python/import.c	Thu Sep 2 00:14:22 2010
@@ -1311,9 +1311,9 @@
 dirpath = rightmost_sep(cpathname);
 if (dirpath == NULL) {
 if (Py_VerboseFlag)
- PySys_WriteStderr(
- "# no %s path found %s\n",
- CACHEDIR, cpathname);
+ PySys_FormatStderr(
+ "# no %U path found %U\n",
+ CACHEDIR, cpathobj);
 Py_DECREF(cpathbytes);
 return;
 }
@@ -1323,8 +1323,8 @@
 if (mkdir(cpathname, dirmode) < 0 && errno != EEXIST) {
 *dirpath = saved;
 if (Py_VerboseFlag)
- PySys_WriteStderr(
- "# cannot create cache dir %s\n", cpathname);
+ PySys_FormatStderr(
+ "# cannot create cache directory %U\n", cpathobj);
 Py_DECREF(cpathbytes);
 return;
 }
@@ -1333,8 +1333,8 @@
 fp = open_exclusive(cpathname, mode);
 if (fp == NULL) {
 if (Py_VerboseFlag)
- PySys_WriteStderr(
- "# can't create %s\n", cpathname);
+ PySys_FormatStderr(
+ "# can't create %U\n", cpathobj);
 Py_DECREF(cpathbytes);
 return;
 }
@@ -1344,7 +1344,7 @@
 PyMarshal_WriteObjectToFile((PyObject *)co, fp, Py_MARSHAL_VERSION);
 if (fflush(fp) != 0 || ferror(fp)) {
 if (Py_VerboseFlag)
- PySys_WriteStderr("# can't write %s\n", cpathname);
+ PySys_FormatStderr("# can't write %U\n", cpathobj);
 /* Don't keep partial file */
 fclose(fp);
 (void) unlink(cpathname);
@@ -1358,7 +1358,7 @@
 fflush(fp);
 fclose(fp);
 if (Py_VerboseFlag)
- PySys_WriteStderr("# wrote %s\n", cpathname);
+ PySys_FormatStderr("# wrote %U\n", cpathobj);
 Py_DECREF(cpathbytes);
 }
 


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /