Fixed bug where if logs folder exists and no index.html exists, the bot will crash
This commit is contained in:
parent
bc3c1e7344
commit
1a8adb1529
1 changed files with 2 additions and 0 deletions
|
@ -171,6 +171,8 @@ class LogBot(SingleServerIRCBot):
|
||||||
if not os.path.exists(self.folder):
|
if not os.path.exists(self.folder):
|
||||||
# Create the log folder if we need to
|
# Create the log folder if we need to
|
||||||
os.mkdir(self.folder)
|
os.mkdir(self.folder)
|
||||||
|
|
||||||
|
if not os.path.exists(index):
|
||||||
create_html_file(index, "Logged Channels")
|
create_html_file(index, "Logged Channels")
|
||||||
append_to_index(index, index_header % "Logged Channels")
|
append_to_index(index, index_header % "Logged Channels")
|
||||||
shutil.copy2(self.stylesheet, self.folder)
|
shutil.copy2(self.stylesheet, self.folder)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue