Update of /cvsroot/freevo/freevo/src/tv
In directory sc8-pr-cvs1:/tmp/cvs-serv807
Modified Files:
epg_xmltv.py
Log Message:
Sometimes cPickle crashes (with a strange cause). Try to use the
normal pickle (== slower but works) when it failed.
Index: epg_xmltv.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/tv/epg_xmltv.py,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** epg_xmltv.py 4 Jun 2003 22:33:11 -0000 1.19
--- epg_xmltv.py 7 Jun 2003 14:24:12 -0000 1.20
***************
*** 10,13 ****
--- 10,17 ----
# -----------------------------------------------------------------------
# $Log$
+ # Revision 1.20 2003/06/07 14:24:12 dischi
+ # Sometimes cPickle crashes (with a strange cause). Try to use the
+ # normal pickle (== slower but works) when it failed.
+ #
# Revision 1.19 2003/06/04 22:33:11 rshortt
# Adding 1 to the pickle.dump uses a binary format that seems WAY quicker to
***************
*** 215,220 ****
else:
# Dump a pickled version for later reads
! pickle.dump(cached_guide, open(pname, 'w'), 1)
!
if not cached_guide:
--- 219,228 ----
else:
# Dump a pickled version for later reads
! try:
! pickle.dump(cached_guide, open(pname, 'w'), 1)
! except:
! print 'strange cPickle error...try pickle'
! import pickle as pypickle
! pypickle.dump(cached_guide, open(pname, 'w'), 1)
if not cached_guide:
***************
*** 278,282 ****
for (days, start_time, stop_time) in data[3:]:
c.times.append((days, int(start_time), int(stop_time)))
-
guide.AddChannel(c)
else: # Add all channels in the XMLTV file
--- 286,289 ----
-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The best
thread debugger on the planet. Designed with thread debugging features
you've never dreamed of, try TotalView 6 free at www.etnus.com.
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog