From b29731c28b2688547dbbd518cd3897cdede94102 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Tue, 10 Sep 2019 14:25:51 +0200 Subject: [PATCH] We don't need this try/except --- src/yunohost/tools.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/yunohost/tools.py b/src/yunohost/tools.py index 8e2635e2c..7b2ee8526 100644 --- a/src/yunohost/tools.py +++ b/src/yunohost/tools.py @@ -1180,11 +1180,7 @@ def _migrate_legacy_migration_json(): last_run_migration_id = str(old_state["number"]) + "_" + old_state["name"] # Extract the list of migration ids - try: - from . import data_migrations - except ImportError: - # Well ugh what are we supposed to do if we can't do this >.>... - pass + from . import data_migrations migrations_path = data_migrations.__path__[0] migration_files = filter(lambda x: re.match("^\d+_[a-zA-Z0-9_]+\.py$", x), os.listdir(migrations_path)) # (here we remove the .py extension and make sure the ids are sorted)