From 3f3d02ba29dca269953cb508f528e5d172eda25b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Lebleu?= Date: Fri, 2 Oct 2015 15:52:30 +0200 Subject: [PATCH] [fix] Simplify is_installed app check --- lib/yunohost/app.py | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/lib/yunohost/app.py b/lib/yunohost/app.py index 24c04945f..3376a7aad 100644 --- a/lib/yunohost/app.py +++ b/lib/yunohost/app.py @@ -1262,19 +1262,7 @@ def _is_installed(app): Boolean """ - try: - installed_apps = os.listdir(apps_setting_path) - except OSError: - os.makedirs(apps_setting_path) - return False - - for installed_app in installed_apps: - if app == installed_app: - return True - else: - continue - - return False + return os.path.isdir(apps_setting_path + app) def _value_for_locale(values):