[Python-checkins] r61343 - tracker/roundup-src/roundup/cgi/actions.py

martin.v.loewis python-checkins at python.org
Mon Mar 10 22:15:03 CET 2008


Author: martin.v.loewis
Date: Mon Mar 10 22:15:03 2008
New Revision: 61343

Modified:
   tracker/roundup-src/roundup/cgi/actions.py
Log:
Protect against connection loss.


Modified: tracker/roundup-src/roundup/cgi/actions.py
==============================================================================
--- tracker/roundup-src/roundup/cgi/actions.py	(original)
+++ tracker/roundup-src/roundup/cgi/actions.py	Mon Mar 10 22:15:03 2008
@@ -998,11 +998,13 @@
                 self.client.STORAGE_CHARSET, self.client.charset, 'replace')
 
         writer = csv.writer(wfile)
-        writer.writerow(columns)
+        # mvl: protect against connection loss
+        self.client._socket_op(writer.writerow, columns)
 
         # and search
         for itemid in klass.filter(matches, filterspec, sort, group):
-            writer.writerow([str(klass.get(itemid, col)) for col in columns])
+            # mvl: likewise
+            self.client._socket_op(writer.writerow, [str(klass.get(itemid, col)) for col in columns])
 
         return '\n'
 


More information about the Python-checkins mailing list