climate-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From skhud...@apache.org
Subject svn commit: r1510792 - /incubator/climate/trunk/rcmet/src/main/python/rcmes/services/directory_helpers.py
Date Mon, 05 Aug 2013 22:55:29 GMT
Author: skhudiky
Date: Mon Aug  5 22:55:29 2013
New Revision: 1510792

URL: http://svn.apache.org/r1510792
Log:
CLIMATE-243: Add capability to retrieve a list of all the evaluation directories within the
work directory.

Modified:
    incubator/climate/trunk/rcmet/src/main/python/rcmes/services/directory_helpers.py

Modified: incubator/climate/trunk/rcmet/src/main/python/rcmes/services/directory_helpers.py
URL: http://svn.apache.org/viewvc/incubator/climate/trunk/rcmet/src/main/python/rcmes/services/directory_helpers.py?rev=1510792&r1=1510791&r2=1510792&view=diff
==============================================================================
--- incubator/climate/trunk/rcmet/src/main/python/rcmes/services/directory_helpers.py (original)
+++ incubator/climate/trunk/rcmet/src/main/python/rcmes/services/directory_helpers.py Mon
Aug  5 22:55:29 2013
@@ -58,10 +58,11 @@ def getResultDirInfo():
 
     if os.path.isdir(dirPath):
         listing = os.listdir(dirPath)
+        directories=[d for d in os.listdir(os.getcwd()) if os.path.isdir(d)]
         listingNoHidden = [f for f in listing if f[0] != '.']
         joinedPaths = [os.path.join(dirPath, f) for f in listingNoHidden]
-        onlyFilesNoDirs = [f for f in joinedPaths if os.path.isfile(f)]
-        finalPaths = [p.replace(WORK_DIR, '') for p in onlyFilesNoDirs]
+        onlyDirs = [f for f in joinedPaths if os.path.isdir(f)]
+        finalPaths = [p.replace(WORK_DIR, '') for p in onlyDirs]
         sorted(finalPaths, key=lambda s: s.lower())
         returnJSON = finalPaths
     else:



Mime
View raw message