mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[fix] Simplify is_installed app check
This commit is contained in:
parent
264e202347
commit
3f3d02ba29
1 changed files with 1 additions and 13 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Reference in a new issue