Update of /cvsroot/freevo/freevo/src/audio/plugins
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7211

Modified Files:
        coversearch.py 
Log Message:
Trap a potential crash if the "guessed" filename doesn't exist.


Index: coversearch.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/audio/plugins/coversearch.py,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -d -r1.30 -r1.31
*** coversearch.py      19 Feb 2004 04:57:56 -0000      1.30
--- coversearch.py      15 May 2004 18:01:13 -0000      1.31
***************
*** 14,17 ****
--- 14,20 ----
  # -----------------------------------------------------------------------
  # $Log$
+ # Revision 1.31  2004/05/15 18:01:13  outlyer
+ # Trap a potential crash if the "guessed" filename doesn't exist.
+ #
  # Revision 1.30  2004/02/19 04:57:56  gsbarbieri
  # Support Web Interface i18n.
***************
*** 289,298 ****
                      # maybe the url is wrong, try to change '.01.' to '.03.'
                      cover[i].ImageUrlLarge = cover[i].ImageUrlLarge.replace('.01.', 
'.03.')
!                     n = urllib2.urlopen(cover[i].ImageUrlLarge)
!                     if not (n.info()['Content-Length'] == '807'):
!                         image = Image.open(cStringIO.StringIO(n.read()))
!                         items += [ menu.MenuItem( ('%s [' + _( 'small' ) + ']' ) % 
cover[i].ProductName,
!                                                  self.cover_create, 
cover[i].ImageUrlLarge) ]
!                     n.close()
  
          box.destroy()
--- 292,305 ----
                      # maybe the url is wrong, try to change '.01.' to '.03.'
                      cover[i].ImageUrlLarge = cover[i].ImageUrlLarge.replace('.01.', 
'.03.')
!                     try:
!                         n = urllib2.urlopen(cover[i].ImageUrlLarge)
! 
!                         if not (n.info()['Content-Length'] == '807'):
!                             image = Image.open(cStringIO.StringIO(n.read()))
!                             items += [ menu.MenuItem( ('%s [' + _( 'small' ) + ']' ) 
% cover[i].ProductName,
!                                                      self.cover_create, 
cover[i].ImageUrlLarge) ]
!                         n.close()
!                     except urllib2.HTTPError:
!                         pass
  
          box.destroy()



-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to