Adapt 'manual' call to migration from dyndns according to previous changes

This commit is contained in:
Alexandre Aubin 2018-02-01 17:49:46 +01:00
parent bafe6efde2
commit c40f14e8f0

View file

@ -232,10 +232,13 @@ def dyndns_update(dyn_host="dyndns.yunohost.org", domain=None, key=None,
from yunohost.tools import _get_migration_by_name from yunohost.tools import _get_migration_by_name
migration = _get_migration_by_name("migrate_to_tsig_sha256") migration = _get_migration_by_name("migrate_to_tsig_sha256")
try: try:
migration["module"].MyMigration().migrate(dyn_host, domain, key) migration.migrate(dyn_host, domain, key)
except Exception as e: except Exception as e:
logger.error(m18n.n('migrations_migration_has_failed', exception=e, **migration), exc_info=1) logger.error(m18n.n('migrations_migration_has_failed',
exception=e,
number=migration.number,
name=migration.name),
exc_info=1)
return return
# Extract 'host', e.g. 'nohost.me' from 'foo.nohost.me' # Extract 'host', e.g. 'nohost.me' from 'foo.nohost.me'