From 7bb7191526fafd9c78a5c45e6a0fb5e88ab88988 Mon Sep 17 00:00:00 2001 From: Markus Unterwaditzer Date: Thu, 1 Jan 2015 16:22:00 +0100 Subject: [PATCH] Catch less errors --- vdirsyncer/storage/filesystem.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/vdirsyncer/storage/filesystem.py b/vdirsyncer/storage/filesystem.py index 43a5f9b..6a17c59 100644 --- a/vdirsyncer/storage/filesystem.py +++ b/vdirsyncer/storage/filesystem.py @@ -7,6 +7,7 @@ :license: MIT, see LICENSE for more details. ''' +import errno import os from .base import Item, Storage @@ -53,8 +54,8 @@ class FilesystemStorage(Storage): path = expand_path(path) try: collections = os.listdir(path) - except OSError: - if not kwargs.get('create', True): + except OSError as e: + if e.errno != errno.ENOENT: raise else: for collection in collections: