# HG changeset patch # User Manuel Jacob # Date 1653961182 -7200 # Node ID c463f45fa114425201085cf5642883fa98e4c44a # Parent 227124098e1410dd9830e805776d80b68ff45afe py3: stop catching TypeError that was raised on Python 2 diff -r 227124098e14 -r c463f45fa114 mercurial/hg.py --- 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)) )