[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[minion-cvs] Generate exception messages correctly; remove needless ...
Update of /home/minion/cvsroot/src/minion/lib/mixminion/server
In directory moria.mit.edu:/tmp/cvs-serv2477/lib/mixminion/server
Modified Files:
Modules.py PacketHandler.py ServerMain.py
Log Message:
Generate exception messages correctly; remove needless space
Index: Modules.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/server/Modules.py,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -d -r1.64 -r1.65
--- Modules.py 28 Nov 2003 04:14:04 -0000 1.64
+++ Modules.py 8 Dec 2003 02:22:56 -0000 1.65
@@ -1378,7 +1378,7 @@
fromAddr = headers['FROM']
if re.search(r'[\[\]:"]', fromAddr):
- raise ParseError("Invalid FROM address: %r", fromAddr)
+ raise ParseError("Invalid FROM address: %r" % fromAddr)
#----------------------------------------------------------------------
Index: PacketHandler.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/server/PacketHandler.py,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -d -r1.33 -r1.34
--- PacketHandler.py 28 Nov 2003 04:14:04 -0000 1.33
+++ PacketHandler.py 8 Dec 2003 02:22:56 -0000 1.34
@@ -328,7 +328,7 @@
elif state[0] == 'V0':
self.__dict__.update(state[1])
else:
- raise MixError("Unrecognized state version %s", state[0])
+ raise MixError("Unrecognized state version %s" % state[0])
def isDelivery(self):
"""Return true iff this packet is a delivery (non-relay) packet."""
Index: ServerMain.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/server/ServerMain.py,v
retrieving revision 1.106
retrieving revision 1.107
diff -u -d -r1.106 -r1.107
--- ServerMain.py 4 Dec 2003 05:02:50 -0000 1.106
+++ ServerMain.py 8 Dec 2003 02:22:56 -0000 1.107
@@ -10,7 +10,7 @@
#XXXX make usage messages have the same format.
-## Directory layout:
+## Directory layout:
# ${BASEDIR}/current-desc [Filename of current server descriptor.]
# version [Version of homedir format.]
#
@@ -589,8 +589,8 @@
LOG.warn("Not rescheduling %s", self.name)
return
elif nextTime < time.time():
- raise MixFatalError("Tried to schedule event %s in the past! (%s)",
- self.name, formatTime(nextTime,1))
+ raise MixFatalError("Tried to schedule event %s in the past! (%s)"
+ %(self.name, formatTime(nextTime,1)))
self.scheduler.scheduleOnce(nextTime, self.name, self)
@@ -680,11 +680,11 @@
raise UIError("The server homedir contains keys for an "
"unrecognized version of the server.")
else:
- raise UIError("""\
-For some reason, your generated server descriptors cannot be parsed. You
-may want to delete all your keysets with server-DELKEYS and have the server
-generate new ones. [Messages sent to the old keys will be lost].\n
-The original error message was '%s'."""%e)
+ raise UIError((
+"For some reason, your generated server descriptors cannot be parsed. You\n"
+"may want to delete all your keysets with server-DELKEYS and have the server\n"
+"generate new ones. [Messages sent to the old keys will be lost].\n"
+"The original error message was '%s'.")%e)
self.keyring.removeDeadKeys()
self.keyring.createKeysAsNeeded()