File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -314,7 +314,7 @@ async def save(
314314 deleted attachments if too much time has passed, and it does not work
315315 on some types of attachments.
316316 chunksize: Optional[:class:`int`]
317- The maximum size of each chunk to process.
317+ The maximum size of each chunk to process. Must be a positive non-null integer.
318318
319319 Returns
320320 -------
@@ -331,6 +331,8 @@ async def save(
331331 Argument `chunksize` is less than 1.
332332 """
333333 if chunksize is not None :
334+ if chunksize < 1 :
335+ raise InvalidArgument ("chunksize must be a positive non-null integer." )
334336 data = self .read_chunked (use_cached = use_cached , chunksize = chunksize )
335337 else :
336338 data = await self .read (use_cached = use_cached )
You can’t perform that action at this time.
0 commit comments