Mercurial > hg
diff hgext/zeroconf/Zeroconf.py @ 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 | 0b7853aee5ae |
children | 1ffeeb91c55d |
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):