r211 - /debtorrent/branches/unique/uniquely.py

camrdale-guest at users.alioth.debian.org camrdale-guest at users.alioth.debian.org
Thu Aug 9 20:55:05 UTC 2007


Author: camrdale-guest
Date: Thu Aug  9 20:55:05 2007
New Revision: 211

URL: http://svn.debian.org/wsvn/debtorrent/?sc=1&rev=211
Log:
Add output flushing to the uniquely script.

Modified:
    debtorrent/branches/unique/uniquely.py

Modified: debtorrent/branches/unique/uniquely.py
URL: http://svn.debian.org/wsvn/debtorrent/debtorrent/branches/unique/uniquely.py?rev=211&op=diff
==============================================================================
--- debtorrent/branches/unique/uniquely.py (original)
+++ debtorrent/branches/unique/uniquely.py Thu Aug  9 20:55:05 2007
@@ -248,6 +248,7 @@
         # Get the old data for this torrent, if any existed
         torrent_file = torrent_prefix + component + "_binary-" + arch + torrent_suffix
         print torrent_file + ": reading ... ",
+        sys.stdout.flush()
         old_files, headers = get_old(torrent_file)
 
         # Create the headers
@@ -268,6 +269,7 @@
 
         # Parse the Packages file for the new data
         print "updating ... ",
+        sys.stdout.flush()
         new_pieces = get_new(filename, old_files, headers, old_all_files, 
                              all_pieces, all_new_pieces)
 
@@ -276,6 +278,7 @@
         if new_pieces:
             # Write the headers
             print "writing ... ",
+            sys.stdout.flush()
             f = gzip.open(torrent_file, 'w')
             for header in header_order:
                 if header in headers:
@@ -293,10 +296,12 @@
         print "done."
 
     print all_file + ": ",
+    sys.stdout.flush()
     # If there were 'all' files found
     if all_pieces or all_new_pieces:
         # Process the new 'all' files found
         print "updating ... ",
+        sys.stdout.flush()
         next_piece = int(all_headers["NextPiece"])
         piece_size = int(all_headers["PieceSize"])
         all_new_pieces.sort()
@@ -319,6 +324,7 @@
     
         # Write the all_headers
         print "writing ... ",
+        sys.stdout.flush()
         f = gzip.open(all_file, 'w')
         for header in header_order:
             if header in all_headers:




More information about the Debtorrent-commits mailing list