From: Antoine Pitrou Date: Thu, 6 Jan 2011 18:30:26 +0000 (+0000) Subject: Merged revisions 87802 via svnmerge from X-Git-Tag: v2.7.2rc1~395 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1f1613f0ccecaa8b87310caec39fc2b274205f73;p=python Merged revisions 87802 via svnmerge from 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) ........ --- diff --git a/Misc/NEWS b/Misc/NEWS index eea77ce0b4..924f1f02f9 100644 --- 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. diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index bcc1219666..8066d457d1 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -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;