mercurial/hg.py
changeset 49301 c463f45fa114
parent 48946 642e31cb55f0
child 49305 53e9422a9b45
--- 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))
         )