[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[minion-cvs] Make paths accept spaces around separators; print paths...



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

Modified Files:
	ClientMain.py 
Log Message:
Make paths accept spaces around separators; print paths in the same format we accept

Index: ClientMain.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/ClientMain.py,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -d -r1.38 -r1.39
--- ClientMain.py	7 Jan 2003 19:06:26 -0000	1.38
+++ ClientMain.py	8 Jan 2003 07:54:23 -0000	1.39
@@ -689,6 +689,8 @@
     # Turn 'path' into a list of server names, '*', and '*swap*'.
     #  (* is not a valid nickname character, so we're safe.)
     path = path.replace(":", ",*swap*,").split(",")
+    # Strip whitespace around the commas and colon.
+    path = [ s.strip() for s in path ]
     # List of servers that appear on the path before the '*'
     enterPath = []
     # List of servers that appear after the '*'.
@@ -1079,9 +1081,9 @@
 
     try:
         path1, path2 = parsePath(keystore, config, path, address, nHops, nSwap)
-        LOG.info("Selected path is [%s][%s]",
-                 " ".join([ s.getNickname() for s in path1 ]),
-                 " ".join([ s.getNickname() for s in path2 ]))
+        LOG.info("Selected path is %s:%s",
+                 ",".join([ s.getNickname() for s in path1 ]),
+                 ",".join([ s.getNickname() for s in path2 ]))
     except MixError, e:
         print >>sys.stderr, e
         sys.exit(1)