Author: bugman Date: Tue Mar 19 18:47:40 2013 New Revision: 18901 URL: http://svn.gna.org/viewcvs/relax?rev=18901&view=rev Log: Python 3 fixes for the relax version information for code checked out from the relax repository. The subversion version.revision() and version.url() functions now handle the Python 3 issue of Popen working with byte arrays instead of normal strings. Modified: trunk/version.py Modified: trunk/version.py URL: http://svn.gna.org/viewcvs/relax/trunk/version.py?rev=18901&r1=18900&r2=18901&view=diff ============================================================================== --- trunk/version.py (original) +++ trunk/version.py Tue Mar 19 18:47:40 2013 @@ -62,6 +62,10 @@ # Loop over the output lines. for line in pipe.stdout.readlines(): + # Decode Python 3 byte arrays. + if hasattr(line, 'decode'): + line = line.decode() + # Split up the line. row = line.split() @@ -94,6 +98,10 @@ # Loop over the output lines. for line in pipe.stdout.readlines(): + # Decode Python 3 byte arrays. + if hasattr(line, 'decode'): + line = line.decode() + # Split up the line. row = line.split()