Update of /cvsroot/freevo/freevo/src/tv
In directory sc8-pr-cvs1:/tmp/cvs-serv2418

Modified Files:
        epg_xmltv.py 
Log Message:
Make sure the user can write the file. It may happen that the user has
no permission at all (try except is protecting us here), but maybe he
has write access to the directory, but not the file itself. So remove
it first and than write. Please check other parts of Freevo for that
problem!


Index: epg_xmltv.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/tv/epg_xmltv.py,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -d -r1.28 -r1.29
*** epg_xmltv.py        28 Aug 2003 18:11:36 -0000      1.28
--- epg_xmltv.py        3 Sep 2003 21:07:50 -0000       1.29
***************
*** 10,13 ****
--- 10,20 ----
  # -----------------------------------------------------------------------
  # $Log$
+ # Revision 1.29  2003/09/03 21:07:50  dischi
+ # Make sure the user can write the file. It may happen that the user has
+ # no permission at all (try except is protecting us here), but maybe he
+ # has write access to the directory, but not the file itself. So remove
+ # it first and than write. Please check other parts of Freevo for that
+ # problem!
+ #
  # Revision 1.28  2003/08/28 18:11:36  dischi
  # use util.py pickle function now and remove the uid from filename
***************
*** 222,228 ****
  
              # Write to the file
!             fd = open(config.XMLTV_FILE, 'w')
!             fd.write(data_7bit)
!             fd.close()
          
          guide.timestamp = os.path.getmtime(config.XMLTV_FILE)
--- 229,240 ----
  
              # Write to the file
!             try:
!                 if os.path.isfile(config.XMLTV_FILE):
!                     os.unlink(config.XMLTV_FILE)
!                 fd = open(config.XMLTV_FILE, 'w')
!                 fd.write(data_7bit)
!                 fd.close()
!             except IOError:
!                 print 'unable to save %s' % config.XMLTV_FILE
          
          guide.timestamp = os.path.getmtime(config.XMLTV_FILE)




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to