mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-04-27 14:57:41 +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.
|
:license: MIT, see LICENSE for more details.
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
import errno
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from .base import Item, Storage
|
from .base import Item, Storage
|
||||||
|
|
@ -53,8 +54,8 @@ class FilesystemStorage(Storage):
|
||||||
path = expand_path(path)
|
path = expand_path(path)
|
||||||
try:
|
try:
|
||||||
collections = os.listdir(path)
|
collections = os.listdir(path)
|
||||||
except OSError:
|
except OSError as e:
|
||||||
if not kwargs.get('create', True):
|
if e.errno != errno.ENOENT:
|
||||||
raise
|
raise
|
||||||
else:
|
else:
|
||||||
for collection in collections:
|
for collection in collections:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue