[Mailman-Users] Adding backup to multi-server config
Jeff Taylor
shdwdrgn at sourpuss.net
Sun Dec 23 23:36:17 CET 2012
No problems, I'm at least aware of the indented nature of python. I'll
get this code added in later in the week and give it a trial run, see
what happens. Thanks!
On 12/23/2012 02:55 PM, Mark Sapiro wrote:
> 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
More information about the Mailman-Users
mailing list