Update of /cvsroot/freevo/freevo/helpers
In directory sc8-pr-cvs1:/tmp/cvs-serv21427

Modified Files:
        imdb.py 
Log Message:
some try-except if you can't write files

Index: imdb.py
===================================================================
RCS file: /cvsroot/freevo/freevo/helpers/imdb.py,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** imdb.py     24 Jun 2003 18:38:41 -0000      1.24
--- imdb.py     25 Jun 2003 15:37:37 -0000      1.25
***************
*** 12,15 ****
--- 12,18 ----
  # -----------------------------------------------------------------------
  # $Log$
+ # Revision 1.25  2003/06/25 15:37:37  dischi
+ # some try-except if you can't write files
+ #
  # Revision 1.24  2003/06/24 18:38:41  dischi
  # Fixed handling when search returns only one result
***************
*** 319,325 ****
          return None
          
!     i = open(filename, 'w')
!     i.write(r.read())
!     i.close()
  
      # try to crop the image to avoid borders by imdb and unidented tot return
--- 322,333 ----
          return None
          
!     try:
!         i = open(filename, 'w')
!         i.write(r.read())
!         i.close()
!     except IOError:
!         print "Writing image failed"
!         conn.close()
!         return None
  
      # try to crop the image to avoid borders by imdb and unidented tot return
***************
*** 381,385 ****
      title, info, None = imdb_data
      
!     i = codecs.open('%s.fxd' % filename, 'w', encoding='utf-8')
      i.write("<?xml version=\"1.0\" ?>\n<freevo>\n")
      i.write("  <copyright>\n" +
--- 389,399 ----
      title, info, None = imdb_data
      
! 
!     try:
!         i = codecs.open('%s.fxd' % filename, 'w', encoding='utf-8')
!     except IOError:
!         print "Writing .fxd failed"
!         return 
! 
      i.write("<?xml version=\"1.0\" ?>\n<freevo>\n")
      i.write("  <copyright>\n" +




-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to