Rpmlint fails with Python exception in 4.1.0.24

When using mb2 check or sfdk check rpmlint fails with KeyError: 'TreatErrorsAsWarnings':

============================ rpmlint session starts ============================
rpmlint: 2.0.0
configuration:
    /srv/mer/toolings/SailfishOS-4.1.0.24/usr/lib/python3.8/site-packages/rpmlint/configdefaults.toml
checks: 24, packages: 1


harbour-actiontest.i486: W: unstripped-binary-or-object /usr/bin/harbour-actiontest
harbour-actiontest.i486: E: standard-dir-owned-by-package /usr/bin
harbour-actiontest.i486: W: non-coherent-filename /home/mersdk/project/RPMS harbour-actiontest-0.1-1.i486.rpm
harbour-actiontest.i486: E: no-signature
harbour-actiontest.i486: E: no-packager-tag
harbour-actiontest.i486: W: no-manual-page-for-binary harbour-actiontest
harbour-actiontest.i486: W: no-documentation
harbour-actiontest.i486: E: no-changelogname-tag
harbour-actiontest.i486: E: ldd-failed /usr/bin/harbour-actiontest
harbour-actiontest.i486: W: invalid-license LICENSE

=========== 1 packages and 0 specfiles checked; 5 errors, 5 warnings ===========
(none): W: unable to init enchant, spellchecking disabled.
Traceback (most recent call last):
  File "/usr/bin/rpmlint", line 11, in <module>
    load_entry_point('rpmlint==2.0.0', 'console_scripts', 'rpmlint')()
  File "/srv/mer/toolings/SailfishOS-4.1.0.24/usr/lib/python3.8/site-packages/rpmlint/__init__.py", line 142, in lint
    sys.exit(lint.run())
  File "/srv/mer/toolings/SailfishOS-4.1.0.24/usr/lib/python3.8/site-packages/rpmlint/lint.py", line 72, in run
    if not self.config.configuration['TreatErrorsAsWarnings']:
KeyError: 'TreatErrorsAsWarnings'

It was tested with a dockerized Platform SDK and a pretty new upgraded Application SDK.

With the 4.0.1.48 target it works.

Is this a know issue or exists a workaround?

This is a known issue. It will be fixed in the next SDK release (3.6).

You can work it around by patching /usr/share/scratchbox2/modes/sdk-build+pp/fs_rules.lua under the build engine with this change.