mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-04-15 12:25:52 +00:00
Catch less errors
This commit is contained in:
parent
b548c27384
commit
7bb7191526
1 changed files with 3 additions and 2 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in a new issue