mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[fix] Do not mind if backup removal fails
This commit is contained in:
parent
beec9e4150
commit
1c11d8ce94
1 changed files with 3 additions and 3 deletions
|
@ -464,8 +464,6 @@ def service_saferemove(service, conf_file, force=False):
|
|||
del services[service]['conffiles'][conf_file]
|
||||
except KeyError: pass
|
||||
deleted = True
|
||||
msignals.display(m18n.n('service_configuration_backup', conf_backup_file),
|
||||
'info')
|
||||
else:
|
||||
services[service]['conffiles'][conf_file] = previous_hash
|
||||
os.remove(conf_backup_file)
|
||||
|
@ -552,7 +550,9 @@ def service_safecopy(service, new_conf_file, conf_file, force=False):
|
|||
|
||||
# Remove the backup file if the configuration has not changed
|
||||
if new_hash == previous_hash:
|
||||
os.remove(conf_backup_file)
|
||||
try:
|
||||
os.remove(conf_backup_file)
|
||||
except OSError: pass
|
||||
elif os.path.exists(conf_backup_file):
|
||||
msignals.display(m18n.n('service_configuration_backup', conf_backup_file),
|
||||
'info')
|
||||
|
|
Loading…
Add table
Reference in a new issue