mailRe: r26667 - /trunk/dep_check.py


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

Header


Content

Posted by Edward d'Auvergne on November 20, 2014 - 15:59:
Hi Troels,

You should take note of this change, as it is in code you introduced.
You might find the problem and solution useful for the future.

Regards,

Edward



On 20 November 2014 15:58,  <edward@xxxxxxxxxxxxx> wrote:
Author: bugman
Date: Thu Nov 20 15:58:14 2014
New Revision: 26667

URL: http://svn.gna.org/viewcvs/relax?rev=26667&view=rev
Log:
Big Python 3 bug fix for the dep_check module for the detection of the 
NMRPipe showApod software.

The showApod program was falsely detected as always not being present when 
using Python 3.  This is
because the output of the program was being tested using string 
comparisons.  However the output
from programs obtained from the subprocess module is no longer strings but 
rather byte-arrays in
Python 3.  Therefore the byte-array is not being converted to text if 
Python 3 is being used,
allowing the showApod software to be detected.


Modified:
    trunk/dep_check.py

Modified: trunk/dep_check.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/dep_check.py?rev=26667&r1=26666&r2=26667&view=diff
==============================================================================
--- trunk/dep_check.py  (original)
+++ trunk/dep_check.py  Thu Nov 20 15:58:14 2014
@@ -268,8 +268,13 @@
         # Split the output into lines.
         line_split = output.splitlines()

+        # The first line, decoding Python 3 byte arrays.
+        line = line_split[0]
+        if hasattr(line, 'decode'):
+            line = line.decode()
+
         # Now make test.
-        if line_split[0] == 'showApod: Show Effect of Processing on Noise 
and Linewidth.':
+        if line == 'showApod: Show Effect of Processing on Noise and 
Linewidth.':
             showApod_software = True
         else:
             showApod_software = False


_______________________________________________
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@xxxxxxx

To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-commits



Related Messages


Powered by MHonArc, Updated Sat Nov 29 17:20:20 2014