changeset 13722:f4a85acef50c

wireproto: fix decodelist to properly return empty list Needed by tests for next patch introducing known().
author Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
date Tue, 22 Mar 2011 07:40:02 +0100
parents 3458c15ab2f0
children e615765fdcc7
files mercurial/wireproto.py
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/wireproto.py	Tue Mar 22 07:38:32 2011 +0100
+++ b/mercurial/wireproto.py	Tue Mar 22 07:40:02 2011 +0100
@@ -15,7 +15,9 @@
 # list of nodes encoding / decoding
 
 def decodelist(l, sep=' '):
-    return map(bin, l.split(sep))
+    if l:
+        return map(bin, l.split(sep))
+    return []
 
 def encodelist(l, sep=' '):
     return sep.join(map(hex, l))