Closes all files. If you put real :class:`file` objects into the :attr:`files` dict you can call this method to automatically close them all in one go.
(self)
| 647 | pass |
| 648 | |
| 649 | def close(self) -> None: |
| 650 | """Closes all files. If you put real :class:`file` objects into the |
| 651 | :attr:`files` dict you can call this method to automatically close |
| 652 | them all in one go. |
| 653 | """ |
| 654 | if self.closed: |
| 655 | return |
| 656 | try: |
| 657 | files = self.files.values() |
| 658 | except AttributeError: |
| 659 | files = () |
| 660 | for f in files: |
| 661 | try: |
| 662 | f.close() |
| 663 | except Exception: |
| 664 | pass |
| 665 | self.closed = True |
| 666 | |
| 667 | def get_environ(self) -> WSGIEnvironment: |
| 668 | """Return the built environ. |
no test coverage detected