Mercurial > public > mercurial-scm > hg
diff tests/tinyproxy.py @ 49279:127d33e63d1a
branching: merge stable into default
author | Rapha?l Gom?s <rgomes@octobus.net> |
---|---|
date | Wed, 08 Jun 2022 15:46:04 +0200 |
parents | 6000f5b25c9b b5fe10b3c9f5 |
children | 24ee91ba9aa8 |
line wrap: on
line diff
--- a/tests/tinyproxy.py Thu Jun 02 23:57:56 2022 +0200 +++ b/tests/tinyproxy.py Wed Jun 08 15:46:04 2022 +0200 @@ -73,12 +73,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