test: Create all intermediary maildirs
Don't fail if root maildir folder does not exist it. Create it recursively. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
This commit is contained in:
parent
da0ba2e266
commit
c1f75a6c94
@ -108,7 +108,7 @@ class OLITestLib():
|
|||||||
maildir = os.path.join(cls.testdir, 'mail', folder)
|
maildir = os.path.join(cls.testdir, 'mail', folder)
|
||||||
for subdir in ('','tmp','cur','new'):
|
for subdir in ('','tmp','cur','new'):
|
||||||
try:
|
try:
|
||||||
os.mkdir(os.path.join(maildir, subdir))
|
os.makedirs(os.path.join(maildir, subdir))
|
||||||
except OSError as e:
|
except OSError as e:
|
||||||
if e.errno != 17: # 'already exists' is ok.
|
if e.errno != 17: # 'already exists' is ok.
|
||||||
raise
|
raise
|
||||||
|
Loading…
Reference in New Issue
Block a user