Author: duncan
Date: Wed Mar  7 17:59:27 2007
New Revision: 9310

Modified:
   branches/rel-1/freevo/src/helpers/makelogos.py

Log:
Updated to print what is saved and what is not saved


Modified: branches/rel-1/freevo/src/helpers/makelogos.py
==============================================================================
--- branches/rel-1/freevo/src/helpers/makelogos.py      (original)
+++ branches/rel-1/freevo/src/helpers/makelogos.py      Wed Mar  7 17:59:27 2007
@@ -57,11 +57,15 @@
     channel = i['id']
     #print '%s - %s' % (imgsrc, channel)
     if imgsrc:
-        img = Image.open_from_memory(urllib2.urlopen(str(imgsrc)).read())
-        # Convert the image into a PNG and save to logos directory
-        output_file = config.TV_LOGOS + '/' + channel + '.png'
         try:
-            img.save(output_file)
-        except IOError, e:
-            print e
+            img = Image.open_from_memory(urllib2.urlopen(str(imgsrc)).read())
+            # Convert the image into a PNG and save to logos directory
+            output_file = config.TV_LOGOS + '/' + channel + '.png'
+            try:
+                img.save(output_file)
+                print 'Saved "%s" for channel "%s"' % (output_file, channel)
+            except IOError, e:
+                print e
+        except Exception, e:
+            print 'Failed to get "%s" for channel "%s"\nerror "%s"' % (imgsrc, 
channel, e)
 

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to