Author: bugman
Date: Mon Feb  9 10:51:07 2015
New Revision: 27608

URL: http://svn.gna.org/viewcvs/relax?rev=27608&view=rev
Log:
Merged revisions 27606 via svnmerge from 
svn+ssh://[email protected]/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/nmrglue/   (props changed)
    branches/nmrglue/prompt/interpreter.py

Propchange: branches/nmrglue/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Mon Feb  9 10:51:07 2015
@@ -1 +1 @@
-/trunk:1-27604
+/trunk:1-27606

Modified: branches/nmrglue/prompt/interpreter.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/nmrglue/prompt/interpreter.py?rev=27608&r1=27607&r2=27608&view=diff
==============================================================================
--- branches/nmrglue/prompt/interpreter.py      (original)
+++ branches/nmrglue/prompt/interpreter.py      Mon Feb  9 10:51:07 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
[email protected]

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

Reply via email to