From a0f8aa0ca2936e630506f15d688b56a617cac25a Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Sun, 10 Nov 2013 21:58:39 +0100 Subject: Create directory recursively. --- pyaggr3g470r/search.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyaggr3g470r/search.py b/pyaggr3g470r/search.py index afb1b6ab..9fd67124 100644 --- a/pyaggr3g470r/search.py +++ b/pyaggr3g470r/search.py @@ -52,7 +52,7 @@ def create_index(): """ feeds = models.Feed.objects() if not os.path.exists(indexdir): - os.mkdir(indexdir) + os.makedirs(indexdir) ix = create_in(indexdir, schema) writer = ix.writer() for feed in feeds: @@ -73,7 +73,7 @@ def add_to_index(articles, feed): ix = open_dir(indexdir) except (EmptyIndexError, OSError) as e: if not os.path.exists(indexdir): - os.mkdir(indexdir) + os.makedirs(indexdir) ix = create_in(indexdir, schema) writer = AsyncWriter(ix) for article in articles: -- cgit