mailr27607 - in /branches/frame_order_cleanup: ./ prompt/interpreter.py


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

Header


Content

Posted by edward on February 09, 2015 - 10:51:
Author: bugman
Date: Mon Feb  9 10:51:04 2015
New Revision: 27607

URL: http://svn.gna.org/viewcvs/relax?rev=27607&view=rev
Log:
Merged revisions 27606 via svnmerge from 
svn+ssh://bugman@xxxxxxxxxxx/svn/relax/trunk

........
  r27606 | bugman | 2015-02-09 10:50:36 +0100 (Mon, 09 Feb 2015) | 10 lines
  
  Fix for bug #23259 (https://gna.org/bugs/?23259).
  
  This is the broken user functions in the prompt UI with the RelaxError: The 
user function 'X' has
  been renamed to 'Y'.  The problem was that the only the first part of the 
user function name, for
  example 'minimise' from 'minimise.calculate' was being checked in the user 
function name translation
  table.  As the minimise user function has been renamed to minimise.execute, 
'minimise' is in the
  translation table and hence minimise.calculate was being identified as the 
minimise user function.
  Now the full user function name is reconstructed before checking the 
translation table.
........

Modified:
    branches/frame_order_cleanup/   (props changed)
    branches/frame_order_cleanup/prompt/interpreter.py

Propchange: branches/frame_order_cleanup/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Mon Feb  9 10:51:04 2015
@@ -1 +1 @@
-/trunk:1-27603
+/trunk:1-27606

Modified: branches/frame_order_cleanup/prompt/interpreter.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/frame_order_cleanup/prompt/interpreter.py?rev=27607&r1=27606&r2=27607&view=diff
==============================================================================
--- branches/frame_order_cleanup/prompt/interpreter.py  (original)
+++ branches/frame_order_cleanup/prompt/interpreter.py  Mon Feb  9 10:51:04 
2015
@@ -1,6 +1,6 @@
 
###############################################################################
 #                                                                            
 #
-# Copyright (C) 2003-2014 Edward d'Auvergne                                  
 #
+# Copyright (C) 2003-2015 Edward d'Auvergne                                  
 #
 # Copyright (C) 2014 Troels E. Linnet                                        
 #
 #                                                                            
 #
 # This file is part of the program relax (http://www.nmr-relax.com).         
 #
@@ -597,7 +597,7 @@
         # Catch old user function calls or class method calls.
         if code.co_code in ['e\x00\x00\x83\x00\x00Fd\x00\x00S', 
'e\x00\x00j\x01\x00\x83\x00\x00Fd\x00\x00S']:
             # Is this an old user function?
-            if len(code.co_names) and code.co_names[0] in 
uf_translation_table:
+            if len(code.co_names) and '.'.join(code.co_names) in 
uf_translation_table:
                 raise RelaxError("The user function '%s' has been renamed to 
'%s'." % (code.co_names[0], uf_translation_table[code.co_names[0]]))
 
         # Execute the code.




Related Messages


Powered by MHonArc, Updated Mon Feb 09 11:00:04 2015