r352 - in /debtorrent/trunk: DebTorrent/BT1/makemetafile.py DebTorrent/BT1/track.py DebTorrent/download_bt1.py test.py

camrdale-guest at users.alioth.debian.org camrdale-guest at users.alioth.debian.org
Thu Jan 24 07:00:35 UTC 2008


Author: camrdale-guest
Date: Thu Jan 24 07:00:32 2008
New Revision: 352

URL: http://svn.debian.org/wsvn/debtorrent/?sc=1&rev=352
Log:
Fixed some bugs in the previous few commits.

Modified:
    debtorrent/trunk/DebTorrent/BT1/makemetafile.py
    debtorrent/trunk/DebTorrent/BT1/track.py
    debtorrent/trunk/DebTorrent/download_bt1.py
    debtorrent/trunk/test.py

Modified: debtorrent/trunk/DebTorrent/BT1/makemetafile.py
URL: http://svn.debian.org/wsvn/debtorrent/debtorrent/trunk/DebTorrent/BT1/makemetafile.py?rev=352&op=diff
==============================================================================
--- debtorrent/trunk/DebTorrent/BT1/makemetafile.py (original)
+++ debtorrent/trunk/DebTorrent/BT1/makemetafile.py Thu Jan 24 07:00:32 2008
@@ -693,8 +693,7 @@
     ordering_headers = {}
     if separate_all:
         (piece_ordering, ordering_headers) = getordering(file, torrent_file)
-        if separate_all in [1, 3]:
-            (piece_ordering_all, ordering_all_headers) = getordering(file, torrent_all_file, True)
+        (piece_ordering_all, ordering_all_headers) = getordering(file, torrent_all_file, True)
 
     file = abspath(file)
     if file.endswith('.gz'):
@@ -841,9 +840,9 @@
             ordering_all_headers = {}
             piece_ordering = {}
             ordering_headers = {}
-            if separate_all:
+            if self.config['separate_all']:
                 (piece_ordering, ordering_headers) = getordering('_'.join(self.path))
-                if separate_all in [1, 3]:
+                if self.config['separate_all'] in [1, 3]:
                     (piece_ordering_all, ordering_all_headers) = getordering('_'.join(self.path), all = True)
         
             (info, info_all) = getpieces(h, separate_all = self.config['separate_all'],

Modified: debtorrent/trunk/DebTorrent/BT1/track.py
URL: http://svn.debian.org/wsvn/debtorrent/debtorrent/trunk/DebTorrent/BT1/track.py?rev=352&op=diff
==============================================================================
--- debtorrent/trunk/DebTorrent/BT1/track.py (original)
+++ debtorrent/trunk/DebTorrent/BT1/track.py Thu Jan 24 07:00:32 2008
@@ -216,8 +216,8 @@
         if version < 1:
             try:
                 tempstate['stats'] = {}
-                if completed in tempstate:
-                    for hash, num in tempstate['completed']:
+                if 'completed' in tempstate:
+                    for hash, num in tempstate['completed'].items():
                         tempstate['stats'][hash] = {'completed': num,
                                                     'downloaded': 0,
                                                     'uploaded': 0}

Modified: debtorrent/trunk/DebTorrent/download_bt1.py
URL: http://svn.debian.org/wsvn/debtorrent/debtorrent/trunk/DebTorrent/download_bt1.py?rev=352&op=diff
==============================================================================
--- debtorrent/trunk/DebTorrent/download_bt1.py (original)
+++ debtorrent/trunk/DebTorrent/download_bt1.py Thu Jan 24 07:00:32 2008
@@ -906,6 +906,7 @@
         # Initialize the saved state it if it wasn't found
         if not self.pickled_data:
             must_find_files = True
+            self.pickled_data = {}
             self.pickled_data['resume data'] = {'priority': {}, 'files': {}}
             self.pickled_data['stats'] = {'upload': 0L, 'download': 0L}
             self.pickled_data['version'] = 1

Modified: debtorrent/trunk/test.py
URL: http://svn.debian.org/wsvn/debtorrent/debtorrent/trunk/test.py?rev=352&op=diff
==============================================================================
--- debtorrent/trunk/test.py (original)
+++ debtorrent/trunk/test.py Thu Jan 24 07:00:32 2008
@@ -258,9 +258,14 @@
               (1, ['install', 'bison-doc']),
               (1, ['install', 'crash-whitepaper']),
               (1, ['install', 'doc-iana']),
+              (1, ['install', 'libhypre1.6.0c2']),
+              (1, ['install', 'rar']),
               (1, ['install', 'aboot-base']),
               (1, ['install', 'aap-doc']),
               (1, ['install', 'ada-reference-manual']),
+              (1, ['install', '2vcard']),
+              (1, ['install', 'avahi-dbg']),
+              (1, ['install', 'chasen-cannadic']),
               ]),
 
          }




More information about the Debtorrent-commits mailing list