[Mailman-Users] Adding backup to multi-server config

Mark Sapiro mark at msapiro.net
Sun Dec 23 22:55:44 CET 2012


Stephen J. Turnbull wrote:

>Mark Sapiro writes:
>
>Python is indentation-sensitive.  Do you really mean a dedent there
>relative to the surrounding stanza?  It doesn't seem to be an artifact
>of TABs or something like that.


No, it's just lack of careful typing and proof-reading on my part.
(Also, a clue that what I wrote was inadequately tested at best).


> > Find the section in the definition of the files() method that looks like
> > 
> >             if ext <> extension:
> >                 continue
> >             when, digest = filebase.split('+')
> >             # Throw out any files which don't match our bitrange.  BAW: test
> >             # performance and end-cases of this algorithm.  MAS: both
> >             # comparisons need to be <= to get complete range.
> >             if lower is None or (lower <= long(digest, 16) <= upper):
> >                 key = float(when)
> >                 while times.has_key(key):
> >                     key += DELTA
> >                 times[key] = filebase
> > 
> > and add the following
> > 


As Stephen notes (thank you), this code block should be indented an
additional four spaces.


> >         now = time.time()
> >         age = now - float(when)
> >         # Only process defined 'old' entries.
> >         if not (
> >                 hasattr(mm_cfg, 'QRUNNER_MESSAGE_IS_OLD_DELAY') and
> >                 mm_cfg.QRUNNER_MESSAGE_IS_OLD_DELAY and
> >                 age > mm_cfg.QRUNNER_MESSAGE_IS_OLD_DELAY):
> >             continue


So that the first 4 lines line up with the 'between' lines below and
the remaining lines are also appropriately indented.


> > between
> > 
> >             when, digest = filebase.split('+')
> > 
> > and
> > 
> >             # Throw out any files which don't match our bitrange.  BAW: test

-- 
Mark Sapiro <mark at msapiro.net>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan



More information about the Mailman-Users mailing list