mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-26 00:41:43 +02:00
* fixes #12150 * reworked from !15083 * part of #12404 * part of #11104 * enable tests * take over maintainership
18 lines
457 B
Diff
18 lines
457 B
Diff
submitted as:
|
|
https://github.com/cherrypy/cherrypy/pull/1897
|
|
|
|
--- a/cherrypy/lib/__init__.py
|
|
+++ b/cherrypy/lib/__init__.py
|
|
@@ -70,6 +70,11 @@
|
|
raise StopIteration()
|
|
next = __next__
|
|
|
|
+ def __del__(self):
|
|
+ """Close input on descturct."""
|
|
+ if hasattr(self.input, 'close'):
|
|
+ self.input.close()
|
|
+
|
|
|
|
def file_generator_limited(fileobj, count, chunk_size=65536):
|
|
"""Yield the given file object in chunks.
|