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

Modified Files:
        epg_xmltv.py 
Log Message:
Use the "best" Python pickle available. Starting in Python 2.3 this is 
a defined constant, so we'll use the constant; older versions of Python
will continue to use the binary format.


Index: epg_xmltv.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/tv/epg_xmltv.py,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** epg_xmltv.py        23 Aug 2003 12:51:43 -0000      1.25
--- epg_xmltv.py        24 Aug 2003 18:15:59 -0000      1.26
***************
*** 10,13 ****
--- 10,18 ----
  # -----------------------------------------------------------------------
  # $Log$
+ # Revision 1.26  2003/08/24 18:15:59  outlyer
+ # Use the "best" Python pickle available. Starting in Python 2.3 this is
+ # a defined constant, so we'll use the constant; older versions of Python
+ # will continue to use the binary format.
+ #
  # Revision 1.25  2003/08/23 12:51:43  dischi
  # removed some old CVS log messages
***************
*** 77,82 ****
--- 82,89 ----
  if float(sys.version[0:3]) < 2.3:
      import strptime
+     PICKLE_PROTOCOL = 1
  else:
      import _strptime as strptime
+     PICKLE_PROTOCOL = pickle.HIGHEST_PROTOCOL
  
  # The XMLTV handler from openpvr.sourceforge.net
***************
*** 185,193 ****
                  # 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:
--- 192,200 ----
                  # Dump a pickled version for later reads
                  try:
!                     pickle.dump(cached_guide, open(pname, 'w'), PICKLE_PROTOCOL)
                  except:
                      print 'strange cPickle error...try pickle'
                      import pickle as pypickle
!                     pypickle.dump(cached_guide, open(pname, 'w'), PICKLE_PROTOCOL)
  
      if not cached_guide:




-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines
at the same time. Free trial click here:http://www.vmware.com/wl/offer/358/0
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to