()
| 354 | |
| 355 | |
| 356 | def tor_running() -> bool: |
| 357 | global TOR_PROCESS |
| 358 | if TOR_PROCESS and TOR_PROCESS.poll() is None and local_port_open("127.0.0.1", TOR_SOCKS_PORT): |
| 359 | return True |
| 360 | if local_port_open("127.0.0.1", TOR_SOCKS_PORT): |
| 361 | return True |
| 362 | if TOR_PROCESS and TOR_PROCESS.poll() is not None: |
| 363 | TOR_PROCESS = None |
| 364 | return False |
| 365 | |
| 366 | |
| 367 | def pysocks_available() -> bool: |
no test coverage detected