Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e85da7a

Browse files
committed
Issue #7858: Raise an error properly when os.utime() fails under Windows
on an existing file. (this does not seem to be easily testable)
1 parent b715fac commit e85da7a

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

Misc/NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ Core and Builtins
3030
Library
3131
-------
3232

33+
- Issue #7858: Raise an error properly when os.utime() fails under Windows
34+
on an existing file.
35+
3336
- Issue #3839: wsgiref should not override a Content-Length header set by
3437
the application. Initial patch by Clovis Fabricio.
3538

Modules/posixmodule.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3256,6 +3256,7 @@ posix_utime(PyObject *self, PyObject *args)
32563256
something is wrong with the file, when it also
32573257
could be the time stamp that gives a problem. */
32583258
win32_error("utime", NULL);
3259+
goto done;
32593260
}
32603261
Py_INCREF(Py_None);
32613262
result = Py_None;

0 commit comments

Comments
 (0)