mailr4534 - /1.3/relax_io.py


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

Header


Content

Posted by edward on January 09, 2008 - 11:56:
Author: bugman
Date: Wed Jan  9 11:56:14 2008
New Revision: 4534

URL: http://svn.gna.org/viewcvs/relax?rev=4534&view=rev
Log:
Updated the relax_io.mkdir_nofail() function.

Changed the 'print_flag' arg to 'verbosity' and updated the docstring to 
epydoc format.


Modified:
    1.3/relax_io.py

Modified: 1.3/relax_io.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/relax_io.py?rev=4534&r1=4533&r2=4534&view=diff
==============================================================================
--- 1.3/relax_io.py (original)
+++ 1.3/relax_io.py Wed Jan  9 11:56:14 2008
@@ -157,8 +157,14 @@
     sys.stderr = log_stderr
 
 
-def mkdir_nofail(dir=None, print_flag=1):
-    """Create the given directory, or exit if the directory exists."""
+def mkdir_nofail(dir=None, verbosity=1):
+    """Create the given directory, or exit without raising an error if the 
directory exists.
+
+    @param dir:         The directory to create.
+    @type dir:          str
+    @param verbosity:   The verbosity level.
+    @type verbosity:    int
+    """
 
     # No directory given.
     if dir == None:
@@ -168,7 +174,7 @@
     try:
         makedirs(dir)
     except OSError:
-        if print_flag:
+        if verbosity:
             print "Directory ./" + dir + " already exists.\n"
 
 




Related Messages


Powered by MHonArc, Updated Wed Jan 09 12:00:20 2008