Mercurial > hg
changeset 26665:6331a0c310db
util: also catch IndexError
This makes life so, so much easier for hgwatchman, which provides a named tuple
but throws an IndexError instead of a TypeError.
author | Sean Farley <sean@farley.io> |
---|---|
date | Tue, 13 Oct 2015 16:05:30 -0700 |
parents | 640b807dcce0 |
children | e901df65b108 |
files | mercurial/util.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/util.py Wed Oct 14 12:23:49 2015 +0200 +++ b/mercurial/util.py Tue Oct 13 16:05:30 2015 -0700 @@ -963,7 +963,7 @@ """ try: return st[stat.ST_MTIME] - except TypeError: + except (TypeError, IndexError): # osutil.stat doesn't allow index access and its st_mtime is int return st.st_mtime