Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Oliver <excid3@gmail.com>2010-02-28 15:48:42 -0600
committerChris Oliver <excid3@gmail.com>2010-02-28 15:48:42 -0600
commit1a8adb1529c32e9861d2362ede2a220616c36d00 (patch)
tree0f98445b025a6916b3261dc1656191d07a479e30
parentbc3c1e7344ac978d5b3dec7fc0c90acc74f8019a (diff)
Fixed bug where if logs folder exists and no index.html exists, the bot will crash
-rw-r--r--logbot.py2
1 files changed, 2 insertions, 0 deletions
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)