]> granicus.if.org Git - python/commitdiff
Issue #7858: Raise an error properly when os.utime() fails under Windows
authorAntoine Pitrou <solipsis@pitrou.net>
Thu, 6 Jan 2011 18:25:55 +0000 (18:25 +0000)
committerAntoine Pitrou <solipsis@pitrou.net>
Thu, 6 Jan 2011 18:25:55 +0000 (18:25 +0000)
on an existing file.

(this does not seem to be easily testable)

Misc/NEWS
Modules/posixmodule.c

index bdac346b9aa8a3729334082a6583cdcd653c0dce..df42025e1258ef69664c8f9db1d71a579f8afa99 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -30,6 +30,9 @@ Core and Builtins
 Library
 -------
 
+- Issue #7858: Raise an error properly when os.utime() fails under Windows
+  on an existing file.
+
 - Issue #3839: wsgiref should not override a Content-Length header set by
   the application.  Initial patch by Clovis Fabricio.
 
index 0cd6340cd48f1ea8762b1c1bb2ab08470ffc496a..a37efca8667c938955664518ca9787dcbaa4b6f0 100644 (file)
@@ -3256,6 +3256,7 @@ posix_utime(PyObject *self, PyObject *args)
            something is wrong with the file, when it also
            could be the time stamp that gives a problem. */
         win32_error("utime", NULL);
+        goto done;
     }
     Py_INCREF(Py_None);
     result = Py_None;