mailr16322 - in /branches/uf_redesign: ./ data/__init__.py


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

Header


Content

Posted by edward on May 16, 2012 - 19:03:
Author: bugman
Date: Wed May 16 19:03:22 2012
New Revision: 16322

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

........
  r16321 | bugman | 2012-05-16 19:02:48 +0200 (Wed, 16 May 2012) | 3 lines
  
  The relax data store is_empty() method now only prints to STDERR if the 
verbosity flag is set.
........

Modified:
    branches/uf_redesign/   (props changed)
    branches/uf_redesign/data/__init__.py

Propchange: branches/uf_redesign/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Wed May 16 19:03:22 2012
@@ -1,1 +1,1 @@
-/1.3:1-16313
+/1.3:1-16321

Modified: branches/uf_redesign/data/__init__.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/uf_redesign/data/__init__.py?rev=16322&r1=16321&r2=16322&view=diff
==============================================================================
--- branches/uf_redesign/data/__init__.py (original)
+++ branches/uf_redesign/data/__init__.py Wed May 16 19:03:22 2012
@@ -216,16 +216,19 @@
             status.observers.pipe_alteration.notify()
 
 
-    def is_empty(self):
+    def is_empty(self, verbosity=False):
         """Method for testing if the relax data store is empty.
 
-        @return:    True if the data store is empty, False otherwise.
-        @rtype:     bool
+        @keyword verbosity: A flag which if True will cause messages to be 
printed to STDERR.
+        @type verbosity:    bool
+        @return:            True if the data store is empty, False otherwise.
+        @rtype:             bool
         """
 
         # No pipes should exist.
         if not self.keys() == []:
-            stderr.write("The relax data store contains the data pipes 
%s.\n" % self.keys())
+            if verbosity:
+                stderr.write("The relax data store contains the data pipes 
%s.\n" % self.keys())
             return False
 
         # Objects which should be in here.
@@ -252,7 +255,8 @@
                 continue
 
             # An object has been added.
-            stderr.write("The relax data store contains the object %s.\n" % 
name)
+            if verbosity:
+                stderr.write("The relax data store contains the object 
%s.\n" % name)
             return False
 
         # The data store is empty.




Related Messages


Powered by MHonArc, Updated Fri May 18 09:20:02 2012