mirror of https://gitlab.com/bashrc2/epicyon
Check that directory exists
parent
5b2986d685
commit
d9ee131302
3
theme.py
3
theme.py
|
|
@ -68,6 +68,7 @@ def _copyThemeHelpFiles(baseDir: str, themeName: str,
|
||||||
if destHelpMarkdownFile == 'profile.md' or \
|
if destHelpMarkdownFile == 'profile.md' or \
|
||||||
destHelpMarkdownFile == 'final.md':
|
destHelpMarkdownFile == 'final.md':
|
||||||
destHelpMarkdownFile = 'welcome_' + destHelpMarkdownFile
|
destHelpMarkdownFile = 'welcome_' + destHelpMarkdownFile
|
||||||
|
if os.path.isdir(baseDir + '/accounts'):
|
||||||
copyfile(themeDir + '/' + helpMarkdownFile,
|
copyfile(themeDir + '/' + helpMarkdownFile,
|
||||||
baseDir + '/accounts/' + destHelpMarkdownFile)
|
baseDir + '/accounts/' + destHelpMarkdownFile)
|
||||||
break
|
break
|
||||||
|
|
@ -659,6 +660,8 @@ def _setClearCacheFlag(baseDir: str) -> None:
|
||||||
"""Sets a flag which can be used by an external system
|
"""Sets a flag which can be used by an external system
|
||||||
(eg. a script in a cron job) to clear the browser cache
|
(eg. a script in a cron job) to clear the browser cache
|
||||||
"""
|
"""
|
||||||
|
if not os.path.isdir(baseDir + '/accounts'):
|
||||||
|
return
|
||||||
flagFilename = baseDir + '/accounts/.clear_cache'
|
flagFilename = baseDir + '/accounts/.clear_cache'
|
||||||
with open(flagFilename, 'w+') as flagFile:
|
with open(flagFilename, 'w+') as flagFile:
|
||||||
flagFile.write('\n')
|
flagFile.write('\n')
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue