(socket_path: str)
| 889 | |
| 890 | |
| 891 | def connect_unix(socket_path: str): |
| 892 | sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) |
| 893 | try: |
| 894 | sock.connect(socket_path) |
| 895 | except OSError as err: |
| 896 | if err.args[0] == 'AF_UNIX path too long' and os.uname()[0] == 'Linux': |
| 897 | sock.connect(os.path.join('/proc/self/cwd', os.path.relpath(socket_path))) |
| 898 | return sock |
| 899 | |
| 900 | |
| 901 | def test_multirpc(node_factory): |
no test coverage detected