From e9ebfdea3acc0164cb05056b045413a080de458c Mon Sep 17 00:00:00 2001 From: Morgan Collett Date: Wed, 10 Sep 2008 22:17:09 +0200 Subject: [PATCH] #8420: Fix traceback on 404 in ChunkedGlibHTTPRequestHandler self._cleanup does the self._file.close() anyway if the file exists. The self._file.close() removed here is redundant, and will always fail on file not found, which is handled in send_head by returning None for self._file. --- src/sugar/network.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/sugar/network.py b/src/sugar/network.py index c7002906..0e25d731 100644 --- a/src/sugar/network.py +++ b/src/sugar/network.py @@ -97,7 +97,6 @@ class ChunkedGlibHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): gobject.IO_ERR, self._send_next_chunk) else: - self._file.close() self._cleanup() def _send_next_chunk(self, source, condition):