[fix] Simplify is_installed app check

This commit is contained in:
Jérôme Lebleu 2015-10-02 15:52:30 +02:00
parent 264e202347
commit 3f3d02ba29

View file

@ -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):