Skip to content

Commit d7e9e00

Browse files
Victors suggestions
1 parent 8ba9ffd commit d7e9e00

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

Modules/timemodule.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -398,9 +398,8 @@ time_sleep(PyObject *self, PyObject *timeout_obj)
398398
}
399399

400400
PyTime_t timeout;
401-
if (_PyTime_FromSecondsObject(&timeout, timeout_obj, _PyTime_ROUND_TIMEOUT)) {
401+
if (_PyTime_FromSecondsObject(&timeout, timeout_obj, _PyTime_ROUND_TIMEOUT))
402402
return NULL;
403-
}
404403
if (timeout < 0) {
405404
PyErr_SetString(PyExc_ValueError,
406405
"sleep length must be non-negative");

Python/pytime.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,7 @@ pytime_from_object(PyTime_t *tp, PyObject *obj, _PyTime_round_t round,
600600
if (PyErr_ExceptionMatches(PyExc_OverflowError)) {
601601
pytime_overflow();
602602
}
603-
if (PyErr_ExceptionMatches(PyExc_TypeError)) {
603+
else if (PyErr_ExceptionMatches(PyExc_TypeError)) {
604604
PyErr_Format(PyExc_TypeError,
605605
"'%T' object cannot be interpreted as an integer or float",
606606
obj);

0 commit comments

Comments
 (0)