Mercurial > hg
comparison mercurial/windows.py @ 48009:94d4a3f78e99
typing: suppress an name-error warning in `mercurial/windows.py`
Newly caught by pytype 2021-09-09.
Differential Revision: https://phab.mercurial-scm.org/D11469
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Mon, 20 Sep 2021 10:45:18 -0400 |
parents | 4162f6b40f2c |
children | 6000f5b25c9b |
comparison
equal
deleted
inserted
replaced
48008:c0588d389c5f | 48009:94d4a3f78e99 |
---|---|
173 | 173 |
174 if b'+' in mode: | 174 if b'+' in mode: |
175 return mixedfilemodewrapper(fp) | 175 return mixedfilemodewrapper(fp) |
176 | 176 |
177 return fp | 177 return fp |
178 except WindowsError as err: | 178 except WindowsError as err: # pytype: disable=name-error |
179 # convert to a friendlier exception | 179 # convert to a friendlier exception |
180 raise IOError( | 180 raise IOError( |
181 err.errno, '%s: %s' % (encoding.strfromlocal(name), err.strerror) | 181 err.errno, '%s: %s' % (encoding.strfromlocal(name), err.strerror) |
182 ) | 182 ) |
183 | 183 |