mailr16003 - /branches/uf_redesign/generic_fns/exp_info.py


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

Header


Content

Posted by edward on May 05, 2012 - 21:35:
Author: bugman
Date: Sat May  5 21:35:09 2012
New Revision: 16003

URL: http://svn.gna.org/viewcvs/relax?rev=16003&view=rev
Log:
All of the exp_info user functions now check for the presence of the cdp.

This allows for better user feedback.


Modified:
    branches/uf_redesign/generic_fns/exp_info.py

Modified: branches/uf_redesign/generic_fns/exp_info.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/uf_redesign/generic_fns/exp_info.py?rev=16003&r1=16002&r2=16003&view=diff
==============================================================================
--- branches/uf_redesign/generic_fns/exp_info.py (original)
+++ branches/uf_redesign/generic_fns/exp_info.py Sat May  5 21:35:09 2012
@@ -26,6 +26,7 @@
 # relax module imports.
 from info import Info_box
 from data.exp_info import ExpInfo
+from generic_fns import pipes
 from relax_errors import RelaxError
 from relax_io import open_read_file
 from version import version_full
@@ -82,6 +83,9 @@
     @param star:        The NMR-STAR dictionary object.
     @type star:         NMR_STAR instance
     """
+
+    # Test if the current pipe exists.
+    pipes.test()
 
     # Loop over the citations.
     if hasattr(cdp, 'exp_info') and hasattr(cdp.exp_info, 'citations'):
@@ -112,6 +116,9 @@
     @rtype:             tuple of list of int and list of str
     """
 
+    # Test if the current pipe exists.
+    pipes.test()
+
     # The scripts.
     if hasattr(cdp, 'exp_info') and hasattr(cdp.exp_info, 'scripts'):
         for script in cdp.exp_info.scripts:
@@ -136,6 +143,9 @@
     @return:            A list BMRB software IDs and a list of software 
labels.
     @rtype:             tuple of list of int and list of str
     """
+
+    # Test if the current pipe exists.
+    pipes.test()
 
     # Loop over the software.
     software_ids = []
@@ -197,6 +207,9 @@
     @type year:                 int
     """
 
+    # Test if the current pipe exists.
+    pipes.test()
+
     # Set up the experimental info data container, if needed.
     if not hasattr(cdp, 'exp_info'):
         cdp.exp_info = ExpInfo()
@@ -224,6 +237,9 @@
     @type universal_solution:       bool
     """
 
+    # Test if the current pipe exists.
+    pipes.test()
+
     # Check.
     allowed = ['frame order',
                'jw',
@@ -295,6 +311,9 @@
     @type tasks:            list of str
     """
 
+    # Test if the current pipe exists.
+    pipes.test()
+
     # Set up the experimental info data container, if needed.
     if not hasattr(cdp, 'exp_info'):
         cdp.exp_info = ExpInfo()
@@ -311,6 +330,9 @@
     @keyword version:   The program version.
     @type version:      None or str
     """
+
+    # Test if the current pipe exists.
+    pipes.test()
 
     # Unknown program.
     if name not in ['relax', 'NMRPipe', 'Sparky', 'Bruker DC']:
@@ -383,6 +405,9 @@
     @type state:            str
     """
 
+    # Test if the current pipe exists.
+    pipes.test()
+
     # Set up the experimental info data container, if needed.
     if not hasattr(cdp, 'exp_info'):
         cdp.exp_info = ExpInfo()




Related Messages


Powered by MHonArc, Updated Sat May 05 22:00:02 2012