When using yaml.safe_load() on an empty text file, the returned value is None rather than an empty dictionary as I expected. This caused an error when adding the first value, as I would get the error message "NoneType object does not support item assignment".
Expected Behavior
Whether an empty profile.yml file exists or has to be created should not matter. Either way the _profile variable should be initialized as an empty dictionary.
Description
When using yaml.safe_load() on an empty text file, the returned value is None rather than an empty dictionary as I expected. This caused an error when adding the first value, as I would get the error message "NoneType object does not support item assignment".
Expected Behavior
Whether an empty profile.yml file exists or has to be created should not matter. Either way the _profile variable should be initialized as an empty dictionary.