Mercurial > public > mercurial-scm > hg-stable
diff mercurial/hg.py @ 49309:c463f45fa114
py3: stop catching TypeError that was raised on Python 2
author | Manuel Jacob <me@manueljacob.de> |
---|---|
date | Tue, 31 May 2022 03:39:42 +0200 |
parents | 642e31cb55f0 |
children | 53e9422a9b45 |
line wrap: on
line diff
--- a/mercurial/hg.py Tue May 31 03:06:05 2022 +0200 +++ b/mercurial/hg.py Tue May 31 03:39:42 2022 +0200 @@ -76,8 +76,7 @@ # invalid paths specially here. st = os.stat(path) isfile = stat.S_ISREG(st.st_mode) - # Python 2 raises TypeError, Python 3 ValueError. - except (TypeError, ValueError) as e: + except ValueError as e: raise error.Abort( _(b'invalid path %s: %s') % (path, stringutil.forcebytestr(e)) )