hgext/zeroconf/Zeroconf.py
changeset 28422 e2c6092ad422
parent 28421 6d72cc613fc4
child 28504 3c90090320ad
--- a/hgext/zeroconf/Zeroconf.py	Tue Mar 01 10:22:10 2016 +0000
+++ b/hgext/zeroconf/Zeroconf.py	Tue Mar 01 10:18:47 2016 +0000
@@ -80,6 +80,7 @@
 __email__ = "paul at scott dash murphy dot com"
 __version__ = "0.12"
 
+import itertools
 import select
 import socket
 import string
@@ -852,9 +853,8 @@
 
     def entries(self):
         """Returns a list of all entries"""
-        def add(x, y): return x + y
         try:
-            return reduce(add, self.cache.values())
+            return list(itertools.chain.from_iterable(self.cache.values()))
         except Exception:
             return []