Mercurial > hg
changeset 47007:fceccc36873d stable
lint: fix failing code check
8d2b62d716b0 introduced code that `test-check-code.t` wasn't happy about, this
fixes it.
Differential Revision: https://phab.mercurial-scm.org/D10506
author | Raphaël Gomès <rgomes@octobus.net> |
---|---|
date | Wed, 21 Apr 2021 17:59:14 +0200 |
parents | e050efe97fbe |
children | 77e73827a02d |
files | setup.py |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/setup.py Wed Apr 14 09:49:36 2021 -0400 +++ b/setup.py Wed Apr 21 17:59:14 2021 +0200 @@ -438,7 +438,8 @@ else: version = '0+hg' + kw.get('node', '')[:12] elif os.path.exists('mercurial/__version__.py'): - data = open('mercurial/__version__.py').read() + with open('mercurial/__version__.py') as f: + data = f.read() version = re.search('version = b"(.*)"', data).group(1) if version: