Author: bugman Date: Mon Feb 9 10:50:36 2015 New Revision: 27606 URL: http://svn.gna.org/viewcvs/relax?rev=27606&view=rev Log: 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: trunk/prompt/interpreter.py Modified: trunk/prompt/interpreter.py URL: http://svn.gna.org/viewcvs/relax/trunk/prompt/interpreter.py?rev=27606&r1=27605&r2=27606&view=diff ============================================================================== --- trunk/prompt/interpreter.py (original) +++ trunk/prompt/interpreter.py Mon Feb 9 10:50:36 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. _______________________________________________ relax (http://www.nmr-relax.com) This is the relax-commits mailing list relax-commits@gna.org 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