[mod] exception should only be used for exceptional situations and not when buildin functions allow you to do the expected stuff

This commit is contained in:
Laurent Peuch 2016-06-12 00:43:17 +02:00
parent d9081bddef
commit 97128d7d63

View file

@ -90,8 +90,8 @@ def app_fetchlist(url=None, name=None):
"""
# Create app path if not exists
try: os.listdir(repo_path)
except OSError: os.makedirs(repo_path)
if not os.path.exists(repo_path):
os.makedirs(repo_path)
if url is None:
url = 'https://app.yunohost.org/official.json'