diff --git a/lib/yunohost/service.py b/lib/yunohost/service.py index aa1f9d3e6..765598bc2 100644 --- a/lib/yunohost/service.py +++ b/lib/yunohost/service.py @@ -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')