Synchronous cleanup function for atexit
()
| 52 | return |
| 53 | |
| 54 | def sync_cleanup(): |
| 55 | """Synchronous cleanup function for atexit""" |
| 56 | if self.launcher and self.launcher.browser_process: |
| 57 | utils.logger.info("[CDPBrowserManager] atexit: Cleaning up browser process") |
| 58 | self.launcher.cleanup() |
| 59 | |
| 60 | # Register atexit cleanup |
| 61 | atexit.register(sync_cleanup) |