pingviini/Products.CMFPlone — comment on commit 376a9c0aaec15d54bf0c3cf90f8564f9180ecbab
File: Products/CMFPlone/skins/plone_scripts/check_id.py line 73
By mjpieters:

Any reason why the pprop and charset variables cannot be moved to inside the test on the next line? So:

```python
if len(bad_chars) > 0:
pprop = getToolByName(context, 'portal_properties')
charset = getattr(pprop.site_properties, 'default_charset', 'utf-8')
bad_chars = ''.join(bad_chars).decode(charset)
```

That way we save having to look up site properties and the character set until it is absolutely needed.