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

[minion-cvs] Normalize EOL whitespace and add a target to do so for ...



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

Modified Files:
	MMTPServer.py Modules.py ServerConfig.py ServerMain.py 
Log Message:
Normalize EOL whitespace and add a target to do so for us in the future.

Index: MMTPServer.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/server/MMTPServer.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- MMTPServer.py	29 Dec 2002 20:31:57 -0000	1.6
+++ MMTPServer.py	5 Jan 2003 06:49:25 -0000	1.7
@@ -257,7 +257,7 @@
            serverMode -- If true, we start with a server-side negotatiation.
                          otherwise, we start with a client-side negotatiation.
         """
-        self.__sock = sock            
+        self.__sock = sock
         self.__con = tls
         self.fd = self.__con.fileno()
         self.lastActivity = time.time()
@@ -400,7 +400,7 @@
     def tryTimeout(self, cutoff):
         if self.lastActivity <= cutoff:
             warn("Socket %s to %s timed out", self.fd, self.address)
-            # ????     I'm not sure this is right.  Instead of just killing 
+            # ????     I'm not sure this is right.  Instead of just killing
             # ???? the socket, should we shut down the SSL too?
             # ????     Also, should we handle timeout as a separate kind of
             # ???? error from a hooks point of view.

Index: Modules.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/server/Modules.py,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- Modules.py	5 Jan 2003 01:32:45 -0000	1.11
+++ Modules.py	5 Jan 2003 06:49:25 -0000	1.12
@@ -96,10 +96,10 @@
            accept a tuple of: (exitType, address, tag).  If 'tag' is None,
            the message has been decrypted; if 'tag' is 'err', the message is
            corrupt; if 'tag' is 'long', the message has been decrypted, and
-           looks like a possible Zlib bomb. 
-           
+           looks like a possible Zlib bomb.
+
            Otherwise, the message is either a reply or an encrypted
-           forward message.  
+           forward message.
            """
         return SimpleModuleDeliveryQueue(self, queueDir)
 
@@ -146,7 +146,7 @@
     def cleanQueue(self):
         # There is no underlying queue to worry about here; do nothing.
         pass
-        
+
 class SimpleModuleDeliveryQueue(mixminion.server.Queue.DeliveryQueue):
     """Helper class used as a default delivery queue for modules that
        don't care about batching messages to like addresses."""
@@ -505,7 +505,7 @@
 
         # Then it must be okay.
         return 0
-                
+
 #----------------------------------------------------------------------
 class MBoxModule(DeliveryModule):
     """Implementation for MBOX delivery: sends messages, via SMTP, to
@@ -677,13 +677,13 @@
     def getConfigSyntax(self):
         return { "Delivery/SMTP" :
                  { 'Enabled' : ('REQUIRE', _parseBoolean, "no"),
-                   'BlacklistFile' : ('ALLOW', None, None), 
+                   'BlacklistFile' : ('ALLOW', None, None),
                    'SMTPServer' : ('ALLOW', None, 'localhost'),
                    'Message' : ('ALLOW', None, ""),
                    'ReturnAddress': ('ALLOW', None, None), #Required on e
                    'SubjectLine' : ('ALLOW', None,
                                     'Type-III Anonymous Message'),
-                   
+
                    }
                  }
 
@@ -720,7 +720,7 @@
             self.returnAddress, subject, message)
 
         manager.enableModule(self)
-        
+
     def processMessage(self, message, tag, exitType, address):
         assert exitType == mixminion.Packet.SMTP_TYPE
         LOG.trace("Received SMTP message")
@@ -846,7 +846,7 @@
     # FFFF local MTA.
 
     # FFFF We should leave the connection open if we're going to send many
-    # FFFF messages in a row.    
+    # FFFF messages in a row.
     LOG.trace("Sending message via SMTP host %s to %s", server, toList)
     con = smtplib.SMTP(server)
     try:
@@ -900,9 +900,9 @@
 
     if msg and msg[-1] != '\n':
         extra_newline = "\n"
-    else:        
+    else:
         extra_newline = ""
-        
+
     return """\
 %s======= TYPE III ANONYMOUS MESSAGE BEGINS ========
 %s%s%s======== TYPE III ANONYMOUS MESSAGE ENDS =========

Index: ServerConfig.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/server/ServerConfig.py,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- ServerConfig.py	5 Jan 2003 04:29:11 -0000	1.9
+++ ServerConfig.py	5 Jan 2003 06:49:25 -0000	1.10
@@ -127,7 +127,7 @@
     return v
 
 def _parseFraction(frac):
-    """Validation function.  Converts a percentage or a number into a 
+    """Validation function.  Converts a percentage or a number into a
        number between 0 and 1."""
     s = frac.strip().lower()
     try:
@@ -167,7 +167,7 @@
                      'Comments': ('ALLOW', None, None),
                      'ModulePath': ('ALLOW', None, None),
                      'Module': ('ALLOW*', None, None),
-                     
+
 ##                      'MixAlgorithm' : ('ALLOW', _parseMixRule, "Cottrell"),
 ##                      'MixInterval' : ('ALLOW', C._parseInterval, "30 min"),
 ##                      'MixPoolRate' : ('ALLOW', _parseFraction, "60%"),
@@ -187,7 +187,7 @@
                             'IP' : ('ALLOW', C._parseIP, "0.0.0.0"),
                             'Port' : ('ALLOW', C._parseInt, "48099"),
 			  'Allow' : ('ALLOW*', C._parseAddressSet_allow, None),
-                          'Deny' : ('ALLOW*', C._parseAddressSet_deny, None) 
+                          'Deny' : ('ALLOW*', C._parseAddressSet_deny, None)
 			 },
         'Outgoing/MMTP' : { 'Enabled' : ('REQUIRE', C._parseBoolean, "no"),
                           'Allow' : ('ALLOW*', C._parseAddressSet_allow, None),

Index: ServerMain.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/server/ServerMain.py,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- ServerMain.py	5 Jan 2003 04:29:11 -0000	1.15
+++ ServerMain.py	5 Jan 2003 06:49:25 -0000	1.16
@@ -89,12 +89,12 @@
                 location=queueDir, interval=interval)
         elif server['MixAlgorithm'] == 'CottrellMixQueue':
             self.queue = mixminion.server.Queue.CottrellMixQueue(
-                location=queueDir, interval=interval, 
+                location=queueDir, interval=interval,
                 minPool=server.get("MixPoolMinSize", 5),
                 sendRate=server.get("MixPoolRate", 0.6))
         elif server['MixAlgorithm'] == 'BinomialCottrellMixQueue':
             self.queue = mixminion.server.Queue.BinomialCottrellMixQueue(
-                location=queueDir, interval=interval, 
+                location=queueDir, interval=interval,
                 minPool=server.get("MixPoolMinSize", 5),
                 sendRate=server.get("MixPoolRate", 0.6))
         else:
@@ -226,7 +226,7 @@
 
         # The pid file.
         self.pidFile = os.path.join(homeDir, "pid")
-        
+
         self.keyring = mixminion.server.ServerKeys.ServerKeyring(config)
         if self.keyring._getLiveKey() is None:
             LOG.info("Generating a month's worth of keys.")
@@ -302,7 +302,7 @@
 
         # FFFF Support for automatic key rotation.
 
-        # ???? Our cuurent approach can make the server unresponsive when 
+        # ???? Our cuurent approach can make the server unresponsive when
         # ???? mixing many messages at once: We stop answering requests, and
         # ???? don't start again until we've delivered all the pending
         # ???? messages!  Also, we process every packet as soon as it arrives,