Safely close multiple sockets, ignoring errors.
(*sockets)
| 190 | |
| 191 | |
| 192 | def _cleanup_sockets(*sockets): |
| 193 | """Safely close multiple sockets, ignoring errors.""" |
| 194 | for sock in sockets: |
| 195 | if sock is not None: |
| 196 | try: |
| 197 | sock.close() |
| 198 | except OSError: |
| 199 | pass |
| 200 | |
| 201 | |
| 202 | # ============================================================================ |
no test coverage detected
searching dependent graphs…