From 8e7684c7d5f614faa02ed824e1403ecb0d3e424d Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Thu, 18 Apr 2019 15:53:16 +0200 Subject: [PATCH] Use REGEN_CONF_FILE global instead of hard-coded filename --- .../data_migrations/0009_decouple_regenconf_from_services.py | 4 ++-- src/yunohost/regenconf.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/yunohost/data_migrations/0009_decouple_regenconf_from_services.py b/src/yunohost/data_migrations/0009_decouple_regenconf_from_services.py index e65aadfdf..d552d7c9c 100644 --- a/src/yunohost/data_migrations/0009_decouple_regenconf_from_services.py +++ b/src/yunohost/data_migrations/0009_decouple_regenconf_from_services.py @@ -5,7 +5,7 @@ from moulinette.utils.log import getActionLogger from moulinette.utils.filesystem import read_file from yunohost.service import _get_services, _save_services -from yunohost.regenconf import _update_conf_hashes +from yunohost.regenconf import _update_conf_hashes, REGEN_CONF_FILE from yunohost.tools import Migration @@ -20,7 +20,7 @@ class MyMigration(Migration): def migrate(self): if "conffiles" not in read_file("/etc/yunohost/services.yml") \ - or os.path.exists("/etc/yunohost/regenconf.yml"): + or os.path.exists(REGEN_CONF_FILE): logger.warning(m18n.n("migration_0009_not_needed")) return diff --git a/src/yunohost/regenconf.py b/src/yunohost/regenconf.py index 46add4c00..f4163d27c 100644 --- a/src/yunohost/regenconf.py +++ b/src/yunohost/regenconf.py @@ -67,7 +67,7 @@ def regen_conf(operation_logger, names=[], with_diff=False, force=False, dry_run # in debian's postinst script if os.path.exists("/etc/yunohost/installed") \ and ("conffiles" in read_file("/etc/yunohost/services.yml") \ - or not os.path.exists("/etc/yunohost/regenconf.yml")): + or not os.path.exists(REGEN_CONF_FILE)): from yunohost.tools import _get_migration_by_name migration = _get_migration_by_name("decouple_regenconf_from_services") migration.migrate()