diff bitten/master.py @ 90:2c4e104afef8

The build master now transmits snapshot archives without blocking while reading the file and sending the BEEP frames. Closes #17.
author cmlenz
date Thu, 14 Jul 2005 17:10:44 +0000
parents 8ae753a22494
children 2e090827c63a
line wrap: on
line diff
--- a/bitten/master.py
+++ b/bitten/master.py
@@ -308,9 +308,9 @@
         #       asyncore push_with_producer()
         snapshot_path = self.master.get_snapshot(build, type, encoding)
         snapshot_name = os.path.basename(snapshot_path)
-        message = beep.Payload(file(snapshot_path).read(),
+        message = beep.Payload(file(snapshot_path), content_type=type,
                                content_disposition=snapshot_name,
-                               content_type=type, content_encoding=encoding)
+                               content_encoding=encoding)
         self.channel.send_msg(message, handle_reply=handle_reply)
 
 
Copyright (C) 2012-2017 Edgewall Software