From 97128d7d636836068ad6353f331d051121023136 Mon Sep 17 00:00:00 2001 From: Laurent Peuch Date: Sun, 12 Jun 2016 00:43:17 +0200 Subject: [PATCH] [mod] exception should only be used for exceptional situations and not when buildin functions allow you to do the expected stuff --- src/yunohost/app.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/yunohost/app.py b/src/yunohost/app.py index 3b2a6d24f..98beca078 100644 --- a/src/yunohost/app.py +++ b/src/yunohost/app.py @@ -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'