Merge pull request !2804 from rhodecode-enterprise-ce fix/skip_config_dump_if_no_write_access
fix: handles a situation if there are no write permissions
This commit is contained in:
commit
1352c35b75
1 changed files with 8 additions and 0 deletions
|
|
@ -46,6 +46,14 @@ 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 save value for %s, reason: cannot write to config file '%s' due to lack of permissions.",
|
||||
option,
|
||||
ini_path,
|
||||
)
|
||||
return
|
||||
|
||||
updater = ConfigUpdater()
|
||||
updater.read(ini_path)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue