[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[minion-cvs] Fix failing behavior of getNicknameBy* functions



Update of /home/minion/cvsroot/src/minion/lib/mixminion
In directory moria.mit.edu:/tmp/cvs-serv12429/lib/mixminion

Modified Files:
	ClientDirectory.py 
Log Message:
Fix failing behavior of getNicknameBy* functions

Index: ClientDirectory.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/ClientDirectory.py,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- ClientDirectory.py	2 Feb 2004 07:05:49 -0000	1.30
+++ ClientDirectory.py	2 Feb 2004 07:15:18 -0000	1.31
@@ -640,7 +640,10 @@
                 if addr in (desc.getIP(), desc.getHostname()):
                     if desc.getNickname() not in nicknames:
                         nicknames.append(desc.getNickname())
-            return "/".join(nicknames)
+            if nicknames:
+                return "/".join(nicknames)
+            else:
+                return None
         finally:
             self._lock.read_out()
 
@@ -657,7 +660,10 @@
             for (desc,_) in s:
                 if desc.getNickname() not in r:
                     r.append(desc.getNickname())
-            return "/".join(r)
+            if r:
+                return "/".join(r)
+            else:
+                return None
         finally:
             self._lock.read_out()