------------------------------------------------------------
revno: 6745
committer: Barry Warsaw <[email protected]>
branch nick: 3.0
timestamp: Sat 2009-07-04 12:47:24 -0400
message:
  More lint picking.
  Fix a documentation link.
modified:
  .buildout/bin/lint.sh.in
  pylint.rc
  src/mailman/app/moderator.py
  src/mailman/app/notifications.py
  src/mailman/bin/master.py
  src/mailman/docs/README.txt

=== modified file '.buildout/bin/lint.sh.in'
--- .buildout/bin/lint.sh.in    2009-06-30 10:14:49 +0000
+++ .buildout/bin/lint.sh.in    2009-07-04 16:47:24 +0000
@@ -1,4 +1,4 @@
 #! /bin/bash
 
 export PYTHONPATH=${os-paths}
-bin/pylint ${package} --rcfile=pylint.rc
+bin/pylint --rcfile=pylint.rc ${package}

=== modified file 'pylint.rc'
--- pylint.rc   2009-07-01 03:14:26 +0000
+++ pylint.rc   2009-07-04 16:47:24 +0000
@@ -60,7 +60,7 @@
 # R0914: *Too many local variables*
 # W0142: *Used * or ** magic*
 # W0704: *Except doesn't do anything*
-disable-msg=C0103,I0011,R0903,R0914,W0142,W0704
+disable-msg=C0103,I0011,R0903,R0913,R0914,W0142,W0704
 
 
 [REPORTS]

=== modified file 'src/mailman/app/moderator.py'
--- src/mailman/app/moderator.py        2009-03-25 12:05:27 +0000
+++ src/mailman/app/moderator.py        2009-07-04 16:47:24 +0000
@@ -41,13 +41,14 @@
     send_admin_subscription_notice, send_welcome_message)
 from mailman.config import config
 from mailman.core import errors
-from mailman.email.message import Message, UserNotification
+from mailman.email.message import UserNotification
 from mailman.interfaces.action import Action
 from mailman.interfaces.member import AlreadySubscribedError, DeliveryMode
 from mailman.interfaces.requests import RequestType
 
 
 _ = i18n._
+NL = '\n'
 
 vlog = logging.getLogger('mailman.vette')
 slog = logging.getLogger('mailman.subscribe')

=== modified file 'src/mailman/app/notifications.py'
--- src/mailman/app/notifications.py    2009-02-13 01:36:21 +0000
+++ src/mailman/app/notifications.py    2009-07-04 16:47:24 +0000
@@ -33,7 +33,7 @@
 from mailman import Utils
 from mailman import i18n
 from mailman.config import config
-from mailman.email.message import Message, OwnerNotification, UserNotification
+from mailman.email.message import OwnerNotification, UserNotification
 from mailman.interfaces.member import DeliveryMode
 
 

=== modified file 'src/mailman/bin/master.py'
--- src/mailman/bin/master.py   2009-05-16 15:08:46 +0000
+++ src/mailman/bin/master.py   2009-07-04 16:47:24 +0000
@@ -40,7 +40,6 @@
 from mailman.core.logging import reopen
 from mailman.i18n import _
 from mailman.options import Options
-from mailman.utilities.modules import find_name
 
 
 DOT = '.'
@@ -76,6 +75,7 @@
 Usage: %prog [options]""")
 
     def add_options(self):
+        """See `Options`."""
         self.parser.add_option(
             '-n', '--no-restart',
             dest='restartable', default=True, action='store_false',
@@ -101,6 +101,7 @@
 -r are passed straight through to bin/qrunner."""))
 
     def sanity_check(self):
+        """See `Options`."""
         if len(self.arguments) > 0:
             self.parser.error(_('Too many arguments'))
 
@@ -120,7 +121,9 @@
     return hostname, int(pid), filename
 
 
+# pylint: disable-msg=W0232
 class WatcherState(Enum):
+    """Enum for the state of the master process watcher."""
     # Another master watcher is running.
     conflict = 1
     # No conflicting process exists.
@@ -134,12 +137,9 @@
 
     :return: WatcherState describing the state of the lock file.
     """
-
-    # 1 if proc exists on host (but is it qrunner? ;)
-    # 0 if host matches but no proc
-    # hostname if hostname doesn't match
+    # pylint: disable-msg=W0612
     hostname, pid, tempfile = get_lock_data()
-    if hostname <> socket.gethostname():
+    if hostname != socket.gethostname():
         return WatcherState.host_mismatch
     # Find out if the process exists by calling kill with a signal 0.
     try:
@@ -169,6 +169,7 @@
             raise
         # Force removal of lock first.
         lock.disown()
+        # pylint: disable-msg=W0612
         hostname, pid, tempfile = get_lock_data()
         os.unlink(config.LOCK_FILE)
         os.unlink(os.path.join(config.LOCK_DIR, tempfile))
@@ -200,9 +201,10 @@
 a stale master qrunner lock.  Try re-running mailmanctl with the -s flag.
 """)
         else:
+            # Hostname doesn't even match.
             assert status == WatcherState.host_mismatch, (
                 'Invalid enum value: %s' % status)
-            # Hostname doesn't even match.
+            # pylint: disable-msg=W0612
             hostname, pid, tempfile = get_lock_data()
             message = _("""\
 The master qrunner lock could not be acquired, because it appears as if some
@@ -232,6 +234,7 @@
         # Set up our signal handlers.  Also set up a SIGALRM handler to
         # refresh the lock once per day.  The lock lifetime is 1 day + 6 hours
         # so this should be plenty.
+        # pylint: disable-msg=W0613,C0111
         def sigalrm_handler(signum, frame):
             self._lock.refresh()
             signal.alarm(SECONDS_IN_A_DAY)
@@ -320,7 +323,6 @@
             qrunner_config = getattr(config, section_name)
             if not as_boolean(qrunner_config.start):
                 continue
-            class_ = find_name(qrunner_config['class'])
             # Find out how many qrunners to instantiate.  This must be a power
             # of 2.
             count = int(qrunner_config.instances)
@@ -409,6 +411,7 @@
         # Wait for all the children to go away.
         while self._kids:
             try:
+                # pylint: disable-msg=W0612
                 pid, status = os.wait()
                 del self._kids[pid]
             except OSError, e:

=== modified file 'src/mailman/docs/README.txt'
--- src/mailman/docs/README.txt 2009-07-01 03:51:45 +0000
+++ src/mailman/docs/README.txt 2009-07-04 16:47:24 +0000
@@ -80,7 +80,7 @@
 Requirements
 ============
 
-Mailman 3.0 requires `Python 2.6` or newer.
+Mailman 3.0 requires `Python 2.6`_ or newer.
 
 
 .. _`GNU Mailman`: http://www.list.org



--
lp:mailman
https://code.launchpad.net/~mailman-coders/mailman/3.0

Your team Mailman Checkins is subscribed to branch lp:mailman.
To unsubscribe from this branch go to 
https://code.launchpad.net/~mailman-coders/mailman/3.0/+edit-subscription.
_______________________________________________
Mailman-checkins mailing list
[email protected]
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org

Reply via email to