comparison mercurial/hgweb/server.py @ 40874:348352658e4b

py3: stop subscripting socket.error In 3.3 and later, this is now an alias for OSError. I hacked up the server code enough that I was able to trigger the exception handler in server.py from test-http-bundle1.t. Other instances of this either subscript through the `args` member, or reference the errno or strerror attributes. Note that on Windows, the errno value seems to reflect the Winsock error, so the various tests for EPIPE seem like they would always fail. But that seems to be the case in py2 as well.
author Matt Harbison <matt_harbison@yahoo.com>
date Sun, 09 Dec 2018 19:40:54 -0500
parents 8c7ecd32ccce
children 074c72a38423
comparison
equal deleted inserted replaced
40873:44378796c5e5 40874:348352658e4b
92 92
93 def do_write(self): 93 def do_write(self):
94 try: 94 try:
95 self.do_hgweb() 95 self.do_hgweb()
96 except socket.error as inst: 96 except socket.error as inst:
97 if inst[0] != errno.EPIPE: 97 if inst.errno != errno.EPIPE:
98 raise 98 raise
99 99
100 def do_POST(self): 100 def do_POST(self):
101 try: 101 try:
102 self.do_write() 102 self.do_write()