Skip to content

fix stacktrace crash when env vars are badly set in config.yml

This was trying to delete from a dict that was being iterated through. Python doesn't like that! Also, this error does not need to stop the whole operating, just printing an error message should be enough. If the missing env vars from config.yml cause a problem, then the operation will quit, and the error messages will be there.

!571 (merged)

$ fdroid lint
2020-11-12 15:56:49,939 WARNING: unsafe permissions on 'config.yml' (should be 0600)!
2020-11-12 15:56:49,942 ERROR: Environment variable env from awssecretkey is not set!
2020-11-12 15:56:49,943 CRITICAL: Unknown exception found!
Traceback (most recent call last):
  File "/builds/eighthave/fdroid-metadata/fdroidserver/fdroid", line 22, in <module>
    fdroidserver.__main__.main()
  File "/builds/eighthave/fdroid-metadata/fdroidserver/fdroidserver/__main__.py", line 227, in main
    raise e
  File "/builds/eighthave/fdroid-metadata/fdroidserver/fdroidserver/__main__.py", line 208, in main
    mod.main()
  File "/builds/eighthave/fdroid-metadata/fdroidserver/fdroidserver/lint.py", line 583, in main
    config = common.read_config(options)
  File "/builds/eighthave/fdroid-metadata/fdroidserver/fdroidserver/common.py", line 391, in read_config
    for configname, dictvalue in config.items():
RuntimeError: dictionary changed size during iteration
Edited by Hans-Christoph Steiner

Merge request reports