Closed gforcada closed 1 year ago
Issue #40 seems a Python 3 compatibility problem that was already fixed with PR #43.
But indeed, the single l
should be a double ll
.
I guess no one notices, because all exceptions are caught a few lines further.
neither single nor double l
, if at it, please give it a proper name with semantics.
Fixed by @gforcada as part of PR #50.
See:
https://github.com/plone/plone.i18n/blob/1f9e36fffd6978e511af1164d2a7240861b93738/plone/i18n/negotiate/ptsnegotiator.py#L132-L134
This
l
does not raise anundeclared variable
because on line 105 it gets defined.Though, there it is surrounded by an
if
clause, which means that it is not 100% guaranteed that the code does run... maybe is the cause for #40 ?In any case, I would expect that on line
134
one meant to writell
as that's the variable being used on the loop 🤔Looking at the commit that introduced this code here, mentions that it was copied from Products.PlacelessTranslationService, and there we can see that the variable is the one used within the loop 🍀
How come, within 5 years that has not been noticed? 😅