From b6822d46aa0f566a8252a8eb17ee4018ab2f1252 Mon Sep 17 00:00:00 2001 From: mkaay Date: Thu, 12 Nov 2009 19:11:56 +0100 Subject: fixed python25 compatibility --- module/download_thread.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'module') diff --git a/module/download_thread.py b/module/download_thread.py index ff9c25766..158d40147 100644 --- a/module/download_thread.py +++ b/module/download_thread.py @@ -88,8 +88,9 @@ class Download_Thread(threading.Thread): except Checksum, e: self.loadedPyFile.status.type = "failed" self.loadedPyFile.status.error = "Checksum error: %d" % e.getCode() - with open("%s.info" % e.getFile(), "w") as f: - f.write("Checksum not matched!") + f = open("%s.info" % e.getFile(), "w") + f.write("Checksum not matched!") + f.close() except Exception, e: try: -- cgit v1.2.3