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

[minion-cvs] Remove trailing space throughout.



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

Modified Files:
	DNSFarm.py EventStats.py MMTPServer.py Modules.py 
	PacketHandler.py ServerConfig.py ServerKeys.py ServerMain.py 
	ServerQueue.py 
Log Message:
Remove trailing space throughout.

Index: DNSFarm.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/server/DNSFarm.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- DNSFarm.py	10 Nov 2003 04:12:20 -0000	1.4
+++ DNSFarm.py	28 Nov 2003 04:14:04 -0000	1.5
@@ -140,7 +140,7 @@
                     self.threads[-1].start()
         finally:
             self.lock.release()
-            
+
     def _beginLookup(self,name):
         """Helper function: Begin looking up 'name'.
 
@@ -197,7 +197,7 @@
     def __init__(self, dnscache):
         """Create a new DNSThread"""
         threading.Thread.__init__(self)
-        self.dnscache = dnscache 
+        self.dnscache = dnscache
         self.setDaemon(1) # When the process exits, don't wait for this thread.
     def run(self):
         """Thread body: pull questions from the DNS thread queue and

Index: EventStats.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/server/EventStats.py,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- EventStats.py	25 Nov 2003 03:42:31 -0000	1.11
+++ EventStats.py	28 Nov 2003 04:14:04 -0000	1.12
@@ -23,7 +23,7 @@
 
             'AttemptedRelay', 'SuccessfulRelay',
             'FailedRelay', 'UnretriableRelay',
-           
+
             'AttemptedDelivery', 'SuccessfulDelivery',
             'FailedDelivery', 'UnretriableDelivery',
             ]

Index: MMTPServer.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/server/MMTPServer.py,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -d -r1.59 -r1.60
--- MMTPServer.py	27 Nov 2003 08:53:03 -0000	1.59
+++ MMTPServer.py	28 Nov 2003 04:14:04 -0000	1.60
@@ -70,14 +70,14 @@
 
         readfds = self.readers.keys()
         writefds = self.writers.keys()
- 
+
         if not (readfds or writefds):
             # Windows 'select' doesn't timeout properly when we aren't
             # selecting on any FDs.  This should never happen to us,
             # but we'll check for it anyway.
             time.sleep(timeout)
             return
-   
+
         try:
             readfds,writefds,exfds = select.select(readfds,writefds,[],timeout)
         except select.error, e:
@@ -545,7 +545,7 @@
             #self.__sock.close()
             #self.__state = None
             #return
-            
+
         self.__state = self.__shutdownFn
 
     def fileno(self):
@@ -628,7 +628,7 @@
            because the disk is full."""
         SimpleTLSConnection.__init__(self, sock, tls, 1,
                                      "%s:%s"%sock.getpeername())
-        
+
         EventStats.log.receivedConnection() #FFFF addr
 
         self.packetConsumer = consumer
@@ -739,7 +739,7 @@
         self.finished = None
         self.junkCallback = None
         self.rejectCallback = None
-        
+
         SimpleTLSConnection.remove(self)
 
 #----------------------------------------------------------------------
@@ -766,7 +766,7 @@
         DeliverableMessage.__init__(self)
         assert hasattr(pending, 'succeeded')
         assert hasattr(pending, 'failed')
-        assert hasattr(pending, 'getMessage')        
+        assert hasattr(pending, 'getMessage')
         self.pending = pending
     def succeeded(self):
         self.pending.succeeded()
@@ -856,7 +856,7 @@
         self.protocol = None
         self._curPacket = self._curHandle = None
 
-        EventStats.log.attemptedConnect() #FFFF addr        
+        EventStats.log.attemptedConnect() #FFFF addr
         LOG.debug("Opening client connection to %s", self.address)
 
     def isActive(self):
@@ -926,7 +926,7 @@
                 return
 
         LOG.warn("Invalid protocol.  Closing connection to %s", self.address)
-             
+
         # This isn't retriable; we don't talk to servers we don't
         # understand.
         self.shutdown(err=1,retriable=0)
@@ -956,7 +956,7 @@
             self.rejectDigest = sha1(pkt+"REJECTED")
             pkt = SEND_CONTROL+pkt+sha1(pkt+"SEND")
             self.isJunk = 0
-        
+
         assert len(pkt) == SEND_RECORD_LEN
         self.beginWrite(pkt)
         self.finished = self.__sentPacket
@@ -1054,7 +1054,7 @@
         if self.finishedCallback is not None:
             self.finishedCallback()
         self.finishedCallback = None
-        
+
         SimpleTLSConnection.remove(self)
 
 
@@ -1092,7 +1092,7 @@
                 IP = config['Incoming/MMTP'].get('IP')
             if IP is None:
                 IP = "0.0.0.0"
-        # FFFF Until we get the non-clique situation is supported, we don't 
+        # FFFF Until we get the non-clique situation is supported, we don't
         # FFFF listen on IPv6.
         #if ip6_supported:
         #    IP6 = config['Incoming/MMTP'].get('ListenIP6')
@@ -1206,7 +1206,7 @@
     def _sendQueuedPackets(self):
         """Helper function: Find all DNS lookup results and packets in
            self.msgQueue, and begin sending packets to the resulting servers.
-           
+
            This function should only be called from the main thread.
         """
         while 1:

Index: Modules.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/server/Modules.py,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -d -r1.63 -r1.64
--- Modules.py	25 Nov 2003 02:15:14 -0000	1.63
+++ Modules.py	28 Nov 2003 04:14:04 -0000	1.64
@@ -525,7 +525,7 @@
        is sent in packets of exit type FRAGMENT.  The actual exit type and
        delivery address are encoded at the start of the reassembled message.
        """
-    ## 
+    ##
     # _queue: An instance of FragmentDeliveryQueue, or None
     # manager: A pointer back to the module manager.  Used to insert
     #   reassembled messages into other modules' queues.
@@ -548,7 +548,7 @@
                    'MaximumSize' : ('REQUIRE', "size", None),
                    'MaximumInterval' : ('ALLOW', "interval", "2 days" )
                    } }
-    
+
     def validateConfig(self, config, lines, contents):
         frag = config.get('Delivery/Fragmented', {}).get("Enabled")
         if not frag:
@@ -576,7 +576,7 @@
                 LOG.warn("Delivery/Fragmented MaximumSize is larger than can be delivered with %s MaximumSize",ds)
             elif deliverSize > maxSize*10:
                 LOG.warn("%s MaximumSize is larger than is likely to be reassembled from Delivery/Fragmented MaximumSize")
-        
+
     def getRetrySchedule(self):
         return [ ]
     def configure(self, config, manager):
@@ -623,7 +623,7 @@
                 self._queue = None
         finally:
             self.lock.release()
-    
+
 class FragmentDeliveryQueue:
     """Delivery queue for FragmentModule.
 
@@ -699,7 +699,7 @@
             self.pool.expireMessages(cutoff)
         finally:
             self.lock.release()
-            
+
 class _FragmentedDeliveryMessage:
     """Helper class: obeys the interface of mixminion.server.PacketHandler.
        DeliveryMessage, but contains a long message reassembled from
@@ -727,12 +727,12 @@
     def getContents(self):
         if self.contents is None: self.decode()
         return self.contents
-    def isPlaintext(self): 
+    def isPlaintext(self):
         if self.contents is None: self.decode()
         return self.tp == 'plain'
     def isFragment(self): return 0
     def isEncrypted(self): return 0
-    def isError(self): 
+    def isError(self):
         if self.contents is None: self.decode()
         return self.tp == 'err'
     def isOvercompressed(self):
@@ -930,7 +930,7 @@
     # subject: Default subject to use for outgoing mail, if none is given
     #    in the message.
     # fromTag: String to prepend to from name.
-    # returnAddress: Return address for mail; should be an rfc822-style 
+    # returnAddress: Return address for mail; should be an rfc822-style
     #    mailbox.
     # header: Text that should be appended after the headers and before
     #    the message itself.  It must include the empty line that separates
@@ -1076,7 +1076,7 @@
             lines = f.readlines()
         finally:
             f.close()
-        
+
         address_line_re = re.compile(r'([^\s:=]+)\s*[:=]\s*(\S+)')
 
         lineno = 0
@@ -1096,7 +1096,7 @@
         moduleManager.enableModule(self)
 
     def getServerInfoBlock(self):
-        if self.allowFromAddr: 
+        if self.allowFromAddr:
             allowFrom = "yes"
         else:
             allowFrom = "no"
@@ -1138,7 +1138,7 @@
     def __init__(self):
         DeliveryModule.__init__(self)
     def getServerInfoBlock(self):
-        if self.allowFromAddr: 
+        if self.allowFromAddr:
             allowFrom = "yes"
         else:
             allowFrom = "no"
@@ -1375,7 +1375,7 @@
         if k not in MAIL_HEADERS:
             #XXXX this should raise parse error instead.
             LOG.warn("Skipping unrecognized mail header %s"%k)
-        
+
     fromAddr = headers['FROM']
     if re.search(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.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- PacketHandler.py	24 Nov 2003 19:59:05 -0000	1.32
+++ PacketHandler.py	28 Nov 2003 04:14:04 -0000	1.33
@@ -192,7 +192,7 @@
             header1 = header1[overflowLength:]
 
         assert len(header1) == (
-            1876 + subh.routinglen 
+            1876 + subh.routinglen
             - max(0,subh.routinglen-Packet.MAX_ROUTING_INFO_LEN))
 
         header1 = subh.underflow + header1
@@ -311,7 +311,7 @@
 
     def __getstate__(self):
         return "V0", self.__dict__
-        
+
     def __setstate__(self, state):
         if type(state) == types.DictType:
             #XXXX007 remove this case.  (Not used since 0.0.5alpha)

Index: ServerConfig.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/server/ServerConfig.py,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -d -r1.42 -r1.43
--- ServerConfig.py	25 Nov 2003 02:15:14 -0000	1.42
+++ ServerConfig.py	28 Nov 2003 04:14:04 -0000	1.43
@@ -21,7 +21,7 @@
     #   moduleManager
     #
     _restrictFormat = 0
-    
+
     def __init__(self, fname=None, string=None, moduleManager=None):
         # We use a copy of SERVER_SYNTAX, because the ModuleManager will
         # mess it up.
@@ -172,7 +172,7 @@
                 if v:
                     res.append("%s/%s=%r"%(section,k,v))
         return "; ".join(res)
-    
+
     def validateRetrySchedule(self, sectionName, entryName='Retry'):
         """Check whether the retry schedule in self[sectionName][entryName]
            is reasonable.  Warn or raise ConfigError if it isn't.  Ignore

Index: ServerKeys.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/server/ServerKeys.py,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -d -r1.59 -r1.60
--- ServerKeys.py	25 Nov 2003 02:15:14 -0000	1.59
+++ ServerKeys.py	28 Nov 2003 04:14:04 -0000	1.60
@@ -150,7 +150,7 @@
             if ok:
                 t1, t2 = keyset.getLiveness()
                 self.keySets.append( (t1, t2, keyset) )
-                
+
                 LOG.trace("Found key %s (valid from %s to %s)",
                           dirname, formatDate(t1), formatDate(t2))
             else:
@@ -194,10 +194,10 @@
 
         if not state:
             return
-        
+
         LOG.warn("Some generated keysets do not match "
                   "current configuration...")
-        
+
         for ok, ks in state:
             va,vu = ks.getLiveness()
             LOG.warn("Keyset %s (%s--%s):",ks.keyname,formatTime(va,1),
@@ -293,7 +293,7 @@
 
         needToCoverUntil = now+PUBLICATION_LATENCY+PREPUBLICATION_INTERVAL
         timeToCover = needToCoverUntil-lastExpiry
-        
+
         lifetime = self.config['Server']['PublicKeyLifetime'].getSeconds()
         nKeys = int(ceilDiv(timeToCover, lifetime))
 
@@ -625,7 +625,7 @@
     def checkKeys(self):
         """Check whether all the required keys exist and are private."""
         checkPrivateFile(self.packetKeyFile)
-        checkPrivateFile(self.mmtpKeyFile)        
+        checkPrivateFile(self.mmtpKeyFile)
 
     def load(self, password=None):
         """Read the short-term keys from disk.  Must be called before
@@ -1071,7 +1071,7 @@
           Configuration: %s
           """ %(getPlatformSummary(),
                 config.getConfigurationSummary())
-    
+
     # Remove extra (leading or trailing) whitespace from the lines.
     lines = [ line.strip() for line in info.split("\n") ]
     # Remove empty lines
@@ -1228,7 +1228,7 @@
     identityCertText = readFile(fname)
     os.unlink(fname)
     writeFile(filename, certText+identityCertText, 0600)
-        
+
 def getPlatformSummary():
     """Return a string describing the current software and platform."""
     if hasattr(os, "uname"):

Index: ServerMain.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/server/ServerMain.py,v
retrieving revision 1.103
retrieving revision 1.104
diff -u -d -r1.103 -r1.104
--- ServerMain.py	25 Nov 2003 03:42:31 -0000	1.103
+++ ServerMain.py	28 Nov 2003 04:14:05 -0000	1.104
@@ -509,7 +509,7 @@
                 return -1
         finally:
             self.schedLock.release()
-            
+
     def scheduleOnce(self, when, name, cb):
         """Schedule a callback function, 'cb', to be invoked at time 'when.'
         """
@@ -684,7 +684,7 @@
         self.keyring.removeDeadKeys()
         self.keyring.createKeysAsNeeded()
         self.keyring.checkDescriptorConsistency()
-        
+
         if self.config['DirectoryServers'].get('Publish'):
             self.keyring.publishKeys()
 
@@ -792,7 +792,7 @@
                 self.keyring.unlock()
 
         self.processingThread.addJob(c)
-        
+
     def run(self):
         """Run the server; don't return unless we hit an exception."""
         global GOT_HUP
@@ -890,7 +890,7 @@
         """Called when the server's mix is about to fire.  Picks some
            packets to send, and sends them to the appropriate queues.
         """
-        
+
         now = time.time()
         # Before we mix, we need to log the hashes to avoid replays.
         try:
@@ -937,7 +937,7 @@
         self.cleaningThread.join()
         self.processingThread.join()
         self.moduleManager.join()
-        
+
         self.packetHandler.close()
         self.moduleManager.close()
 
@@ -995,7 +995,7 @@
        Otherwise, find and parse the configuration file.
     """
     global _QUIET_OPT
-    options, args = getopt.getopt(args, "hQf:", 
+    options, args = getopt.getopt(args, "hQf:",
                                   ["help", "quiet", "config=",
                                    "daemon", "nodaemon", "echo", "severity="])
     if args:
@@ -1038,9 +1038,9 @@
         config['Server']['Daemon'] = forceDaemon
     if severity is not None:
         config['Server']['LogLevel'] = severity
-    
+
     return config
-        
+
 
 def readConfigFile(configFile):
     """Given a filename from the command line (or None if the user didn't
@@ -1328,7 +1328,7 @@
         reload = 1
         usage = _SIGNAL_SERVER_USAGE % ("server-reload",
                                         "rescan its configuration")
-    
+
     config = configFromServerArgs(cmd, args, usage=usage)
     LOG.setMinSeverity("ERROR")
 
@@ -1399,7 +1399,7 @@
                 os.unlink(publishedFile)
         except OSError, e:
             LOG.warn("Couldn't mark key %s unpublished: %s",num,e)
-        
+
     LOG.info("Telling server to publish descriptors")
 
     _signalServer(config, reload=1)

Index: ServerQueue.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/server/ServerQueue.py,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -d -r1.36 -r1.37
--- ServerQueue.py	24 Nov 2003 19:59:05 -0000	1.36
+++ ServerQueue.py	28 Nov 2003 04:14:05 -0000	1.37
@@ -52,7 +52,7 @@
         self.pending = None
         self.nextAttempt = None
         self.remove = 0
-        
+
     def isPending(self):
         """Return true iff we are currently trying to deliver this message."""
         return self.pending is not None
@@ -72,7 +72,7 @@
     def isRemovable(self):
         """Return true iff this message is old enough to be removed."""
         return self.remove
-    
+
     def __getstate__(self):
         # For pickling.  All future versions of deliverystate will pickle
         #   to a tuple, whose first element will be a version string.