diff options
author | Cédric Bonhomme <kimble.mandel@gmail.com> | 2013-11-10 21:58:39 +0100 |
---|---|---|
committer | Cédric Bonhomme <kimble.mandel@gmail.com> | 2013-11-10 21:58:39 +0100 |
commit | a0f8aa0ca2936e630506f15d688b56a617cac25a (patch) | |
tree | 189a266656f12b9029a403e52644c999b520218e | |
parent | Whoosh indexing. (diff) | |
download | newspipe-a0f8aa0ca2936e630506f15d688b56a617cac25a.tar.gz newspipe-a0f8aa0ca2936e630506f15d688b56a617cac25a.tar.bz2 newspipe-a0f8aa0ca2936e630506f15d688b56a617cac25a.zip |
Create directory recursively.
-rw-r--r-- | pyaggr3g470r/search.py | 4 |
1 files 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: |