Sorry, forgot to attach the patch.
Index: btshowmetainfo.py
===================================================================
RCS file: /cvsroot/bittornado/btshowmetainfo.py,v
retrieving revision 1.2
diff -u -r1.2 btshowmetainfo.py
--- btshowmetainfo.py	24 Feb 2004 17:53:47 -0000	1.2
+++ btshowmetainfo.py	20 Oct 2009 11:30:47 -0000
@@ -52,7 +52,8 @@
     piece_number, last_piece_length = divmod(file_length, piece_length)
     print '%s %i (%i * %i + %i)' \
           % (name,file_length, piece_number, piece_length, last_piece_length)
-    print 'announce url..: %s' % metainfo['announce']
+    if metainfo.has_key('announce'):
+        print 'announce url..: %s' % metainfo['announce']
     if metainfo.has_key('announce-list'):
         list = []
         for tier in metainfo['announce-list']:
Index: BitTornado/BT1/btformats.py
===================================================================
RCS file: /cvsroot/bittornado/BitTornado/BT1/btformats.py,v
retrieving revision 1.3
diff -u -r1.3 btformats.py
--- BitTornado/BT1/btformats.py	25 May 2004 19:00:58 -0000	1.3
+++ BitTornado/BT1/btformats.py	20 Oct 2009 11:30:47 -0000
@@ -55,7 +55,7 @@
     if type(message) != DictType:
         raise ValueError
     check_info(message.get('info'))
-    if type(message.get('announce')) != StringType:
+    if type(message.get('announce', "")) != StringType:
         raise ValueError
 
 def check_peers(message):

Reply via email to