forked from indymedia/epicyon
Create tags directory if needed
parent
92c555d732
commit
d1a16c486c
2
utils.py
2
utils.py
|
@ -149,6 +149,8 @@ def setHashtagCategory(baseDir: str, hashtag: str, category: str,
|
||||||
if not os.path.isfile(hashtagFilename):
|
if not os.path.isfile(hashtagFilename):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
if not os.path.isdir(baseDir + '/tags'):
|
||||||
|
os.mkdir(baseDir + '/tags')
|
||||||
categoryFilename = baseDir + '/tags/' + hashtag + '.category'
|
categoryFilename = baseDir + '/tags/' + hashtag + '.category'
|
||||||
if force:
|
if force:
|
||||||
# don't overwrite any existing categories
|
# don't overwrite any existing categories
|
||||||
|
|
Loading…
Reference in New Issue