[mod] small refactoring, remove useless exception

This commit is contained in:
Laurent Peuch 2019-04-28 03:43:32 +02:00
parent 3b5b7a9ae6
commit 9b08afc118

View file

@ -347,10 +347,7 @@ def tools_postinstall(operation_logger, domain, password, ignore_dyndns=False,
'/home/yunohost.app'
]
for folder in folders_to_create:
try:
os.listdir(folder)
except OSError:
for folder in filter(not os.path.exists, folders_to_create):
os.makedirs(folder)
# Change folders permissions