[mod] remove catchall bad exception

This commit is contained in:
Laurent Peuch 2019-08-25 16:40:41 +02:00
parent ed8fa76624
commit 68e9724517
2 changed files with 3 additions and 3 deletions

View file

@ -185,7 +185,7 @@
"dyndns_could_not_check_provide": "Could not check if {provider:s} can provide {domain:s}.",
"dyndns_could_not_check_available": "Could not check if {domain:s} is available on {provider:s}.",
"dyndns_cron_installed": "The DynDNS cron job has been installed",
"dyndns_cron_remove_failed": "Unable to remove the DynDNS cron job",
"dyndns_cron_remove_failed": "Unable to remove the DynDNS cron job because: {error}",
"dyndns_cron_removed": "The DynDNS cron job has been removed",
"dyndns_ip_update_failed": "Unable to update IP address on DynDNS",
"dyndns_ip_updated": "Your IP address has been updated on DynDNS",

View file

@ -325,8 +325,8 @@ def dyndns_removecron():
"""
try:
os.remove("/etc/cron.d/yunohost-dyndns")
except:
raise YunohostError('dyndns_cron_remove_failed')
except Exception as e:
raise YunohostError('dyndns_cron_remove_failed', error=e)
logger.success(m18n.n('dyndns_cron_removed'))