comparison mercurial/scmposix.py @ 49804:a87338fe8cfa

scmposix: don't subscript IOError This warning disabling has been in place since late 2019 in 667f56d73ceb. We should have had some py3 support at the time, but both pytype complains and subscripting a real FileNotFoundError generated in `hg debugshell` crashed, so maybe this fixes a problem. It looks like all other instances of subscripting exceptions have been replaced (at least as far as greping for `== errno.` revealed).
author Matt Harbison <matt_harbison@yahoo.com>
date Wed, 14 Dec 2022 22:22:12 -0500
parents 6000f5b25c9b
children 7a4143428db7
comparison
equal deleted inserted replaced
49803:55d45d0de4e7 49804:a87338fe8cfa
86 if width > 0 and height > 0: 86 if width > 0 and height > 0:
87 return width, height 87 return width, height
88 except ValueError: 88 except ValueError:
89 pass 89 pass
90 except IOError as e: 90 except IOError as e:
91 if e[0] == errno.EINVAL: # pytype: disable=unsupported-operands 91 if e.errno == errno.EINVAL:
92 pass 92 pass
93 else: 93 else:
94 raise 94 raise
95 return 80, 24 95 return 80, 24