[Mailman-Users] Fwd: Uncaught runner exception
Lothar Schilling
ls at proasyl.de
Fri Mar 22 03:04:49 EDT 2019
Am 21.03.2019 um 17:48 schrieb Mark Sapiro:
> On 3/21/19 9:20 AM, Lothar Schilling wrote:
>> Python 2.6.6 (r266:84292, Aug 18 2016, 15:13:37)
>> [GCC 4.4.7 20120313 (Red Hat 4.4.7-17)] on linux2
>> (InteractiveConsole)
>>>>> from string import lowercase
>>>>> lowercase
>> 'abcdefghijklmnopqrstuvwxyz'
>>>>> import string
>>>>> string
>> <module 'string' from '/usr/lib64/python2.6/string.pyc'>
>
> I'm out of ideas. I have no clue as to where the extended
> string.lowercase is coming from and why only Mailman is seeing it, but
> to work around that, I suggest you change my suggested patch to
>
> === modified file 'Mailman/Archiver/pipermail.py'
> --- Mailman/Archiver/pipermail.py 2018-05-03 21:23:47 +0000
> +++ Mailman/Archiver/pipermail.py 2019-03-02 04:51:23 +0000
> @@ -60,9 +60,12 @@
> else:
> # Mixed case; assume that small parts of the last name will be
> # in lowercase, and check them against the list.
> - while i>0 and (L[i-1][0] in lowercase or
> - L[i-1].lower() in smallNameParts):
> - i = i - 1
> + try:
> + while i>0 and (L[i-1][0] in lowercase or
> + L[i-1].lower() in smallNameParts):
> + i = i - 1
> + except UnicodeDecodeError:
> + pass
> author = SPACE.join(L[-1:] + L[i:-1]) + ', ' + SPACE.join(L[:i])
> return author
>
>
> This will catch the exception and ignore it without the logging.
>
> Also, I have no idea why when you run bin/unshunt, the .pck files remain
> in qfiles/shunt without errors being reported to the terminal or logged
> in mailman's error log. Something is strange about that, but I don't
> know what could cause it.
>
Applied the patch. Thanks again for your kind advice, Mark!
More information about the Mailman-Users
mailing list