Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9da0dfc

Browse files
committed
Move Py_DECREF after PyErr_Format
1 parent4363e9e commit9da0dfc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎Modules/_datetimemodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1510,11 +1510,11 @@ call_tzinfo_method(PyObject *tzinfo, const char *name, PyObject *tzinfoarg)
15101510
GET_TD_SECONDS(offset)==0&&
15111511
GET_TD_MICROSECONDS(offset)<1)||
15121512
GET_TD_DAYS(offset)<-1||GET_TD_DAYS(offset) >=1) {
1513-
Py_DECREF(offset);
15141513
PyErr_Format(PyExc_ValueError,"offset must be a timedelta"
15151514
" strictly between -timedelta(hours=24) and"
15161515
" timedelta(hours=24),"
15171516
" not %R",offset);
1517+
Py_DECREF(offset);
15181518
returnNULL;
15191519
}
15201520
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp