From 1a8adb1529c32e9861d2362ede2a220616c36d00 Mon Sep 17 00:00:00 2001 From: Chris Oliver Date: Sun, 28 Feb 2010 15:48:42 -0600 Subject: Fixed bug where if logs folder exists and no index.html exists, the bot will crash --- logbot.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'logbot.py') diff --git a/logbot.py b/logbot.py index 86e1cc6..d456625 100644 --- a/logbot.py +++ b/logbot.py @@ -171,6 +171,8 @@ class LogBot(SingleServerIRCBot): if not os.path.exists(self.folder): # Create the log folder if we need to os.mkdir(self.folder) + + if not os.path.exists(index): create_html_file(index, "Logged Channels") append_to_index(index, index_header % "Logged Channels") shutil.copy2(self.stylesheet, self.folder) -- cgit v1.2.3