Mercurial > hg
changeset 14063:87ebf72878ed
Zeroconf: catch both ValueError and KeyError in get()
This prevents a traceback during discovery of available hosts.
author | Augie Fackler <durin42@gmail.com> |
---|---|
date | Sat, 30 Apr 2011 07:30:38 -0500 |
parents | 643381286e0c |
children | e4bfb9c337f3 |
files | hgext/zeroconf/Zeroconf.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/zeroconf/Zeroconf.py Sat Apr 30 15:20:27 2011 +0300 +++ b/hgext/zeroconf/Zeroconf.py Sat Apr 30 07:30:38 2011 -0500 @@ -808,7 +808,7 @@ try: list = self.cache[entry.key] return list[list.index(entry)] - except KeyError: + except (KeyError, ValueError): return None def getByDetails(self, name, type, clazz):