Author: bugman Date: Tue Oct 2 14:37:01 2012 New Revision: 17666 URL: http://svn.gna.org/viewcvs/relax?rev=17666&view=rev Log: Python 3 bug fix for the state.load user function. The header line of pickled states (rather than the standard XML states) is of the b'' byte format. This is now converted to a string, and the search expression is comparing it to the raw string r"<\?xml". Modified: trunk/generic_fns/state.py Modified: trunk/generic_fns/state.py URL: http://svn.gna.org/viewcvs/relax/trunk/generic_fns/state.py?rev=17666&r1=17665&r2=17666&view=diff ============================================================================== --- trunk/generic_fns/state.py (original) +++ trunk/generic_fns/state.py Tue Oct 2 14:37:01 2012 @@ -49,12 +49,13 @@ # 1st line. header = file.readline() header = header[:-1] # Strip the trailing newline. + header = str(header) # Convert to a string type. # Be nice and go back to the start of the file. file.seek(0) # XML. - if search("<\?xml", header): + if search(r"<\?xml", header): return 'xml' # Pickle.