##// END OF EJS Templates
py3: stop catching TypeError that was raised on Python 2
Manuel Jacob -
r50196:c463f45f default
parent child Browse files
Show More
@@ -76,8 +76,7 b' def _local(path):'
76 # invalid paths specially here.
76 # invalid paths specially here.
77 st = os.stat(path)
77 st = os.stat(path)
78 isfile = stat.S_ISREG(st.st_mode)
78 isfile = stat.S_ISREG(st.st_mode)
79 # Python 2 raises TypeError, Python 3 ValueError.
79 except ValueError as e:
80 except (TypeError, ValueError) as e:
81 raise error.Abort(
80 raise error.Abort(
82 _(b'invalid path %s: %s') % (path, stringutil.forcebytestr(e))
81 _(b'invalid path %s: %s') % (path, stringutil.forcebytestr(e))
83 )
82 )
General Comments 0
You need to be logged in to leave comments. Login now