fix: handles a situation if there are no write permissions
This commit is contained in:
parent
6dddd37b85
commit
5d31c3bd2e
1 changed files with 4 additions and 0 deletions
|
|
@ -46,6 +46,10 @@ def initialize_ini_config_default_values_if_not_present(
|
|||
log.warning("Config file %s not found.", ini_path)
|
||||
return
|
||||
|
||||
if not os.access(ini_path, os.W_OK):
|
||||
log.warning("Cannot write to config file '%s'; skipping update.", ini_path)
|
||||
return
|
||||
|
||||
updater = ConfigUpdater()
|
||||
updater.read(ini_path)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue