From: <nic...@us...> - 2006-04-07 15:02:54
|
Update of /cvsroot/gtkpod/libgpod/bindings/python/examples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14545 Modified Files: coverart_fetch.py Log Message: Cleanup temp files after we're done. Index: coverart_fetch.py =================================================================== RCS file: /cvsroot/gtkpod/libgpod/bindings/python/examples/coverart_fetch.py,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- coverart_fetch.py 7 Apr 2006 14:52:57 -0000 1.3 +++ coverart_fetch.py 7 Apr 2006 15:02:48 -0000 1.4 @@ -90,7 +90,13 @@ print "Added thumbnails for %s, %s" % (track.album,track.artist) except KeyError: print "No image available for %s, %s" % (track.album,track.artist) - +print "Cleaning up downloaded images..." +# really, we should do this if any of the real work threw an exception +# too. This is just a demo script :-) +for filename in images.values(): + os.unlink(filename) + +print "Writing ipod database..." gpod.itdb_write(itdb, None) -print "Saved db" + |