mailr26670 - /trunk/lib/spectrum/nmrpipe.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on November 20, 2014 - 16:39:
Author: bugman
Date: Thu Nov 20 16:39:20 2014
New Revision: 26670

URL: http://svn.gna.org/viewcvs/relax?rev=26670&view=rev
Log:
Python 3 bug fix for the lib.spectrum.nmrpipe.show_apod_extract() function.

The subprocess module output from the showApod program, or any software, is a 
byte array in Python 3
rather than text.  This is now detected and the byte array converted to text 
before any processing.


Modified:
    trunk/lib/spectrum/nmrpipe.py

Modified: trunk/lib/spectrum/nmrpipe.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/lib/spectrum/nmrpipe.py?rev=26670&r1=26669&r2=26670&view=diff
==============================================================================
--- trunk/lib/spectrum/nmrpipe.py       (original)
+++ trunk/lib/spectrum/nmrpipe.py       Thu Nov 20 16:39:20 2014
@@ -226,6 +226,10 @@
     # Wait for finish and get return code.
     return_value = Temp.wait()
 
+    # Python 3 support - convert byte arrays to text.
+    if hasattr(output, 'decode'):
+        output = output.decode()
+
     return output.splitlines()
 
 




Related Messages


Powered by MHonArc, Updated Thu Nov 20 19:00:02 2014