]> granicus.if.org Git - python/commitdiff
Merged revisions 87802 via svnmerge from
authorAntoine Pitrou <solipsis@pitrou.net>
Thu, 6 Jan 2011 18:30:26 +0000 (18:30 +0000)
committerAntoine Pitrou <solipsis@pitrou.net>
Thu, 6 Jan 2011 18:30:26 +0000 (18:30 +0000)
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r87802 | antoine.pitrou | 2011-01-06 19:25:55 +0100 (jeu., 06 janv. 2011) | 6 lines

  Issue #7858: Raise an error properly when os.utime() fails under Windows
  on an existing file.

  (this does not seem to be easily testable)
........

Misc/NEWS
Modules/posixmodule.c

index eea77ce0b4a71ffd79d10064b60a99844d591f41..924f1f02f9934b6421c12f3cb4c12a08e4460141 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -25,6 +25,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 bcc1219666ca808b55157e62a61693e1721b9bea..8066d457d115fd4d960e406153865d9cf61d2ff1 100644 (file)
@@ -2843,6 +2843,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;