Update of /cvsroot/freevo/freevo/src/gui
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17226/src/gui

Modified Files:
        imagelib.py 
Log Message:
fix crash when item.image is no string

Index: imagelib.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/gui/imagelib.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** imagelib.py 1 Jan 2005 18:37:59 -0000       1.8
--- imagelib.py 2 Jan 2005 11:38:38 -0000       1.9
***************
*** 149,166 ****
              type = item.type
  
!     key = '%s-%s-%s-%s-%s-%s-%s-%s' % (icon_dir, item.image, type,
!                                        item.type, width, height, force,
!                                        os.stat(item.image)[stat.ST_MTIME])
! 
!     if item['rotation']:
!         key = '%s-%s' % (key, item['rotation'])
              
!     if item.media and item.media.item == item:
!         key = '%s-%s' % (key, item.media)
          
!     image = cache[key]
  
!     if image:
!         return image
  
      image     = None
--- 149,167 ----
              type = item.type
  
!     if isinstance(item.image, (str, unicode)):
!         key = '%s-%s-%s-%s-%s-%s-%s-%s' \
!               % (icon_dir, item.image, type, item.type, width, height, force,
!                  os.stat(item.image)[stat.ST_MTIME])
!                 
!         if item['rotation']:
!             key = '%s-%s' % (key, item['rotation'])
              
!         if item.media and item.media.item == item:
!             key = '%s-%s' % (key, item.media)
          
!         image = cache[key]
  
!         if image:
!             return image
  
      image     = None
***************
*** 245,248 ****
  
      image.scale((width, height))
!     cache[key] = image
      return image
--- 246,250 ----
  
      image.scale((width, height))
!     if isinstance(item.image, (str, unicode)):
!         cache[key] = image
      return image



-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to