mailr17734 - in /trunk/data: align_tensor.py diff_tensor.py


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

Header


Content

Posted by edward on October 08, 2012 - 00:41:
Author: bugman
Date: Mon Oct  8 00:41:24 2012
New Revision: 17734

URL: http://svn.gna.org/viewcvs/relax?rev=17734&view=rev
Log:
The fix of r17733 actually broke Python 2.

The list.__setattr__() method is fundamentally different between Python 2 and 
3!


Modified:
    trunk/data/align_tensor.py
    trunk/data/diff_tensor.py

Modified: trunk/data/align_tensor.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/data/align_tensor.py?rev=17734&r1=17733&r2=17734&view=diff
==============================================================================
--- trunk/data/align_tensor.py (original)
+++ trunk/data/align_tensor.py Mon Oct  8 00:41:24 2012
@@ -1347,5 +1347,8 @@
     def set_untouchable_item(self, slice_obj, value):
         """Set the value for an untouchable MC data structure."""
 
+        # Python 3 fix - the value needs to now be a list?!
+        value = [value]
+
         # Set the value.
-        list.__setitem__(self, slice_obj, [value])
+        list.__setitem__(self, slice_obj, value)

Modified: trunk/data/diff_tensor.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/data/diff_tensor.py?rev=17734&r1=17733&r2=17734&view=diff
==============================================================================
--- trunk/data/diff_tensor.py (original)
+++ trunk/data/diff_tensor.py Mon Oct  8 00:41:24 2012
@@ -898,6 +898,9 @@
             # Get all the dependencies if possible.
             missing_dep = 0
             deps = []
+            print()
+            print(target)
+            print(depends)
             for dep_name in depends:
                 # Modify the dependency name.
                 if dep_name not in ['type', 'spheroid_type']:
@@ -1076,5 +1079,8 @@
     def set_untouchable_item(self, slice_obj, value):
         """Set the value for an untouchable MC data structure."""
 
+        # Python 3 fix - the value needs to now be a list?!
+        value = [value]
+
         # Set the value.
-        list.__setitem__(self, slice_obj, [value])
+        list.__setitem__(self, slice_obj, value)




Related Messages


Powered by MHonArc, Updated Mon Oct 08 01:00:02 2012