[cig-commits] [commit] knepley/upgrade-petsc-interface: Improvement to creating output directory if it doesn't exist. (8328801)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Fri Nov 22 16:36:54 PST 2013


Repository : ssh://geoshell/pylith

On branch  : knepley/upgrade-petsc-interface
Link       : https://github.com/geodynamics/pylith/compare/9c58e45cd6d5031d89122ae1f646064e9a4e0dbf...8328801748d7a9d8b9539dc8bfff44217f99a5d0

>---------------------------------------------------------------

commit 8328801748d7a9d8b9539dc8bfff44217f99a5d0
Author: Brad Aagaard <baagaard at usgs.gov>
Date:   Fri Nov 22 16:39:45 2013 -0800

    Improvement to creating output directory if it doesn't exist.


>---------------------------------------------------------------

8328801748d7a9d8b9539dc8bfff44217f99a5d0
 pylith/meshio/DataWriter.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pylith/meshio/DataWriter.py b/pylith/meshio/DataWriter.py
index aeccb21..e2ae40b 100644
--- a/pylith/meshio/DataWriter.py
+++ b/pylith/meshio/DataWriter.py
@@ -57,7 +57,7 @@ class DataWriter(PetscComponent):
     """
     import os
     relpath = os.path.dirname(filename)
-    if not os.path.exists(relpath):
+    if len(relpath) > 0 and not os.path.exists(relpath):
       os.makedirs(relpath)
     return
 



More information about the CIG-COMMITS mailing list