Mercurial > hg
diff hgext/mq.py @ 49305:53e9422a9b45
py3: catch FileExistsError instead of checking errno == EEXIST
author | Manuel Jacob <me@manueljacob.de> |
---|---|
date | Tue, 31 May 2022 21:16:17 +0200 |
parents | d44e3c45f0e4 |
children | 2e726c934fcd |
line wrap: on
line diff
--- a/hgext/mq.py Tue May 31 16:54:58 2022 +0200 +++ b/hgext/mq.py Tue May 31 21:16:17 2022 +0200 @@ -2151,8 +2151,8 @@ raise error.Abort(_(b"patch queue directory already exists")) try: os.mkdir(self.path) - except OSError as inst: - if inst.errno != errno.EEXIST or not create: + except FileExistsError: + if not create: raise if create: return self.qrepo(create=True)