From 55e2f6c2e6e409a8037ddc14505baa7e0b3bdc9c Mon Sep 17 00:00:00 2001 From: haddaway Date: Sun, 21 Oct 2012 15:25:19 -0700 Subject: [PATCH] OPs, fixed file issue --- toorchat.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/toorchat.py b/toorchat.py index 9f1ec72..fc43b18 100755 --- a/toorchat.py +++ b/toorchat.py @@ -41,7 +41,11 @@ def thread_run(visual): if len(visual.website_buffer) == int(toor_message.last)+1: #sort messages newlist = sorted(visual.website_buffer, key=lambda x: int(x.index), reverse=False) - os.remove('temp.html') + try: + os.remove('temp.html') + except Exception: + #There is a chance this file might now exist + pass temp_file = open('temp.html', 'w') total = "" for item in newlist: