aboutsummaryrefslogtreecommitdiff
path: root/pyaggr3g470r
diff options
context:
space:
mode:
authorCédric Bonhomme <kimble.mandel@gmail.com>2013-11-10 21:58:39 +0100
committerCédric Bonhomme <kimble.mandel@gmail.com>2013-11-10 21:58:39 +0100
commita0f8aa0ca2936e630506f15d688b56a617cac25a (patch)
tree189a266656f12b9029a403e52644c999b520218e /pyaggr3g470r
parentWhoosh indexing. (diff)
downloadnewspipe-a0f8aa0ca2936e630506f15d688b56a617cac25a.tar.gz
newspipe-a0f8aa0ca2936e630506f15d688b56a617cac25a.tar.bz2
newspipe-a0f8aa0ca2936e630506f15d688b56a617cac25a.zip
Create directory recursively.
Diffstat (limited to 'pyaggr3g470r')
-rw-r--r--pyaggr3g470r/search.py4
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:
bgstack15