[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[minion-cvs] Appease pychecker
Update of /home/minion/cvsroot/src/minion/lib/mixminion
In directory moria.mit.edu:/tmp/cvs-serv31656/lib/mixminion
Modified Files:
ClientMain.py Filestore.py Main.py
Log Message:
Appease pychecker
Index: ClientMain.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/ClientMain.py,v
retrieving revision 1.103
retrieving revision 1.104
diff -u -d -r1.103 -r1.104
--- ClientMain.py 24 Jul 2003 17:37:16 -0000 1.103
+++ ClientMain.py 24 Jul 2003 18:01:29 -0000 1.104
@@ -15,7 +15,6 @@
import cPickle
import getopt
import getpass
-import math
import os
import re
import signal
Index: Filestore.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/Filestore.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- Filestore.py 24 Jul 2003 17:37:16 -0000 1.2
+++ Filestore.py 24 Jul 2003 18:01:29 -0000 1.3
@@ -169,22 +169,6 @@
finally:
self._lock.release()
- def moveMessage(self, handle, other):
- """Given a handle and a queue, moves the corresponding message
- from this filestore to the filestore provided. Returns a
- new handle for the message in the destination queue."""
-
- # Since we're switching handles, we don't want to just rename;
- # We really want to copy and delete the old file.
- try:
- self._lock.acquire()
- newHandle = other.queueMessage(self.messageContents(handle))
- self.removeMessage(handle)
- finally:
- self._lock.release()
-
- return newHandle
-
def getMessagePath(self, handle):
"""Given a handle for an existing message, return the name of the
file that contains that message."""
@@ -298,6 +282,22 @@
f.write(contents)
self.finishMessage(f, handle) # handles locking
return handle
+
+ def moveMessage(self, handle, other):
+ """Given a handle and a queue, moves the corresponding message
+ from this filestore to the filestore provided. Returns a
+ new handle for the message in the destination queue."""
+
+ # Since we're switching handles, we don't want to just rename;
+ # We really want to copy and delete the old file.
+ try:
+ self._lock.acquire()
+ newHandle = other.queueMessage(self.messageContents(handle))
+ self.removeMessage(handle)
+ finally:
+ self._lock.release()
+
+ return newHandle
class ObjectStoreMixin:
def __init__(self): pass
Index: Main.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/Main.py,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -d -r1.54 -r1.55
--- Main.py 13 Jul 2003 02:59:30 -0000 1.54
+++ Main.py 24 Jul 2003 18:01:29 -0000 1.55
@@ -190,10 +190,11 @@
def rejectCommand(cmd,args):
cmd = cmd.split()[-1]
- newCmd = { "client" : "send",
- "pool" : "queue",
- "inspect-pool" : "inspect-queue",
- "server" : "server-start" }.get(cmd)
+ cmdDict = { "client" : "send",
+ "pool" : "queue",
+ "inspect-pool" : "inspect-queue",
+ "server" : "server-start" }
+ newCmd = cmdDict.get(cmd)
if newCmd:
print "The command %r is obsolete. Use %r instead."%(cmd,newCmd)
else: