[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[minion-cvs] Make it work with Python 2.0!
Update of /home/minion/cvsroot/src/minion/lib/mixminion
In directory moria.mit.edu:/tmp/cvs-serv16660/lib/mixminion
Modified Files:
ClientMain.py ServerInfo.py
Log Message:
Make it work with Python 2.0!
Index: ClientMain.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/ClientMain.py,v
retrieving revision 1.137
retrieving revision 1.138
diff -u -d -r1.137 -r1.138
--- ClientMain.py 8 Dec 2003 06:35:26 -0000 1.137
+++ ClientMain.py 8 Dec 2003 07:13:58 -0000 1.138
@@ -228,8 +228,8 @@
if isinstance(firstHop, mixminion.ServerInfo.ServerInfo):
ri = firstHop.getRoutingInfo()
else:
- assert isinstance(firstHop, (mixminion.Packet.MMTPHostInfo,
- mixminion.Packet.IPV4Info))
+ assert (isinstance(firstHop, mixminion.Packet.MMTPHostInfo) or
+ isinstance(firstHop, mixminion.Packet.IPV4Info))
ri = firstHop
d.setdefault(ri,[]).append(packet)
result = d.items()
Index: ServerInfo.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/ServerInfo.py,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -d -r1.67 -r1.68
--- ServerInfo.py 8 Dec 2003 02:22:56 -0000 1.67
+++ ServerInfo.py 8 Dec 2003 07:13:58 -0000 1.68
@@ -54,8 +54,8 @@
else:
addr = "%s:%s" % (s.getIP(), s.getPort())
nickname = "'%s'" % s.getNickname()
- elif isinstance(s, (mixminion.Packet.IPV4Info,
- mixminion.Packet.MMTPHostInfo)):
+ elif (isinstance(s, mixminion.Packet.IPV4Info) or
+ isinstance(s, mixminion.Packet.MMTPHostInfo)):
nickname = getNicknameByKeyID(s.keyinfo)
if nickname:
nickname = "'%s'" % nickname