From 8671a4c23018cb59dce8ae9111967ebc32a57743 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Fri, 8 Nov 2019 22:50:47 +0100 Subject: [PATCH] Remove pdb used for debug, and improve comment --- src/yunohost/app.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/yunohost/app.py b/src/yunohost/app.py index e403592a2..cb6ef251f 100644 --- a/src/yunohost/app.py +++ b/src/yunohost/app.py @@ -2905,13 +2905,12 @@ def _patch_legacy_helpers(app_folder): pattern, replace = regexes # If helper is used, attempt to patch the file if helper in content and pattern != "": - try: - content = pattern.sub(replace, content) - replaced_stuff = True - except Exception as e: - import pdb; pdb.set_trace() + content = pattern.sub(replace, content) + replaced_stuff = True - # If we couldn't patch the deprecated helper, abort the install or whichever step is performed + # If the helpert is *still* in the content, it means that we + # couldn't patch the deprecated helper in the previous lines. In + # that case, abort the install or whichever step is performed if helper in content: raise YunohostError("This app is likely pretty old and uses deprecated / outdated helpers that can't be migrated easily. It can't be installed anymore.")