climate-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From good...@apache.org
Subject svn commit: r1486157 - /incubator/climate/trunk/rcmet/src/main/python/rcmes/storage/db.py
Date Fri, 24 May 2013 18:32:47 GMT
Author: goodale
Date: Fri May 24 18:32:46 2013
New Revision: 1486157

URL: http://svn.apache.org/r1486157
Log:
CLIMATE-53:  Removed the os.chdir commands from the extractData function

Modified:
    incubator/climate/trunk/rcmet/src/main/python/rcmes/storage/db.py

Modified: incubator/climate/trunk/rcmet/src/main/python/rcmes/storage/db.py
URL: http://svn.apache.org/viewvc/incubator/climate/trunk/rcmet/src/main/python/rcmes/storage/db.py?rev=1486157&r1=1486156&r2=1486157&view=diff
==============================================================================
--- incubator/climate/trunk/rcmet/src/main/python/rcmes/storage/db.py (original)
+++ incubator/climate/trunk/rcmet/src/main/python/rcmes/storage/db.py Fri May 24 18:32:46
2013
@@ -279,16 +279,12 @@ def extractData ( datasetID, paramID, la
     name.append(version)
     
     # Check to see whether the folder is already created for netCDF or not, then it will
be created
-    os.chdir(cachedir)
-    path=os.getcwd()
     for n in name:
-        if os.path.exists(path + "/" + n):
-            os.chdir(path + "/" + n)
-            path=os.getcwd()
+        path = os.path.join(cachedir, n)
+        if os.path.exists(path):
+            pass
         else:
-            os.mkdir(n)
-            os.chdir(path + "/" + n)
-            path=os.getcwd()
+            os.mkdir(path)
 
     processing_level = 'L3'
     processing_version = "processing_version"  # the processing version is still unknown
and can be added later



Mime
View raw message