branch | stable |
changeset 49274 | b5fe10b3c9f5 |
parent 47500 | 23f5ed6dbcb1 |
child 49279 | 127d33e63d1a |
--- a/tests/tinyproxy.py Thu Jun 02 02:05:11 2022 +0200 +++ b/tests/tinyproxy.py Thu Jun 02 04:39:49 2022 +0200 @@ -74,12 +74,8 @@ print("\t" "connect to %s:%d" % host_port) try: soc.connect(host_port) - except socket.error as arg: - try: - msg = arg[1] - except (IndexError, TypeError): - msg = arg - self.send_error(404, msg) + except socket.error as e: + self.send_error(404, e.strerror) return 0 return 1