mailr16696 - /branches/uf_redesign/generic_fns/spectrum.py


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

Header


Content

Posted by edward on June 06, 2012 - 15:11:
Author: bugman
Date: Wed Jun  6 15:11:07 2012
New Revision: 16696

URL: http://svn.gna.org/viewcvs/relax?rev=16696&view=rev
Log:
Fix for the spectrum.read user function - a RelaxError is now raised if the 
file name is not given.

This is important for the GUI to prevent unintelligible errors to be 
presented to the user.


Modified:
    branches/uf_redesign/generic_fns/spectrum.py

Modified: branches/uf_redesign/generic_fns/spectrum.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/uf_redesign/generic_fns/spectrum.py?rev=16696&r1=16695&r2=16696&view=diff
==============================================================================
--- branches/uf_redesign/generic_fns/spectrum.py (original)
+++ branches/uf_redesign/generic_fns/spectrum.py Wed Jun  6 15:11:07 2012
@@ -1046,6 +1046,10 @@
     if not exists_mol_res_spin_data():
         raise RelaxNoSequenceError
 
+    # Check the file name.
+    if file == None:
+        raise RelaxError("The file name must be supplied.")
+
     # Test that the intensity measures are identical.
     if hasattr(cdp, 'int_method') and cdp.int_method != int_method:
         raise RelaxError("The '%s' measure of peak intensities does not 
match '%s' of the previously loaded spectra." % (int_method, cdp.int_method))




Related Messages


Powered by MHonArc, Updated Wed Jun 06 15:40:02 2012