summaryrefslogtreecommitdiffstats
path: root/Modules/_io/textio.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/_io/textio.c')
-rw-r--r--Modules/_io/textio.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/Modules/_io/textio.c b/Modules/_io/textio.c
index ba28d59..89d922c 100644
--- a/Modules/_io/textio.c
+++ b/Modules/_io/textio.c
@@ -2318,15 +2318,7 @@ textiowrapper_truncate(textio *self, PyObject *args)
return NULL;
Py_DECREF(res);
- if (pos != Py_None) {
- res = PyObject_CallMethodObjArgs((PyObject *) self,
- _PyIO_str_seek, pos, NULL);
- if (res == NULL)
- return NULL;
- Py_DECREF(res);
- }
-
- return PyObject_CallMethodObjArgs(self->buffer, _PyIO_str_truncate, NULL);
+ return PyObject_CallMethodObjArgs(self->buffer, _PyIO_str_truncate, pos, NULL);
}
static PyObject *