From c89312720138c6fbd5e57330d67b22f1120fcd2d Mon Sep 17 00:00:00 2001 From: Kload Date: Fri, 25 Oct 2013 10:35:23 +0000 Subject: [PATCH] Count app fixes --- yunohost_app.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/yunohost_app.py b/yunohost_app.py index 09c75ccd..25f5b1ed 100644 --- a/yunohost_app.py +++ b/yunohost_app.py @@ -614,13 +614,12 @@ def _installed_instance_number(app, last=False): return 0 for installed_app in installed_apps: - if '__' in installed_app: + if number == 0 and app == installed_app: + number = 1 + elif '__' in installed_app: if app == installed_app[:installed_app.index('__')]: if int(installed_app[installed_app.index('__') + 2:]) > number: number = int(installed_app[installed_app.index('__') + 2:]) - else: - if _is_installed(app): - number = 1 return number