Update of /cvsroot/freevo/freevo/src/plugins
In directory sc8-pr-cvs1:/tmp/cvs-serv29704/src/plugins

Modified Files:
        idlebar.py 
Log Message:
A fix for trying to read the cache when it hasn't been created yet.


Index: idlebar.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/plugins/idlebar.py,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** idlebar.py  4 Jun 2003 23:36:35 -0000       1.10
--- idlebar.py  22 Jun 2003 16:53:32 -0000      1.11
***************
*** 23,26 ****
--- 23,29 ----
  # -----------------------------------------------------------------------
  # $Log$
+ # Revision 1.11  2003/06/22 16:53:32  rshortt
+ # A fix for trying to read the cache when it hasn't been created yet.
+ #
  # Revision 1.10  2003/06/04 23:36:35  rshortt
  # Use the real cache dir and add a note about weather codes.
***************
*** 232,239 ****
              except:
                  # HTTP Problems, use cache. Wait till next try.
!                 cachefile = open(self.WEATHERCACHE,'r')
!                 newlist = map(string.rstrip, cachefile.readlines())
!                 temperature,icon = newlist
!                 cachefile.close()
  
          else:
--- 235,246 ----
              except:
                  # HTTP Problems, use cache. Wait till next try.
!                 try:
!                     cachefile = open(self.WEATHERCACHE,'r')
!                     newlist = map(string.rstrip, cachefile.readlines())
!                     temperature,icon = newlist
!                     cachefile.close()
!                 except IOError:
!                     print 'WEATHER: error reading cache. Using fake weather.'
!                     return '0', 'sun.png'
  
          else:




-------------------------------------------------------
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