migros / fotoobo

The mighty Fortinet toolbox
https://fotoobo.readthedocs.io/
GNU Lesser General Public License v3.0
17 stars 2 forks source link

Traceback when log_file without name #175

Closed patrikspiess closed 5 months ago

patrikspiess commented 10 months ago

In the fotoobo config you may specify to log to a file:

log_file:
    name: fotoobo.log

If you omit the name: ... a traceback is created:

File "/home/pspiess/projects/fotoobo/fotoobo/helpers/log.py", line 199, in configure_logging
  filename=config.logging["log_file"]["name"],
TypeError: 'NoneType' object is not subscriptable

Instead a warning should occur.

patrikspiess commented 10 months ago

Or configure fotoobo.log in the current working directory as a default. In this way it would still work without warning.