diff options
Diffstat (limited to 'Objects/fileobject.c')
-rw-r--r-- | Objects/fileobject.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/fileobject.c b/Objects/fileobject.c index 33fb3bc..fb73385 100644 --- a/Objects/fileobject.c +++ b/Objects/fileobject.c @@ -503,7 +503,7 @@ file_truncate(PyFileObject *f, PyObject *args) if (f->f_fp == NULL) return err_closed(); newsizeobj = NULL; - if (!PyArg_ParseTuple(args, "|O:truncate", &newsizeobj)) + if (!PyArg_UnpackTuple(args, "truncate", 0, 1, &newsizeobj)) return NULL; /* Set newsize to current postion if newsizeobj NULL, else to the |