You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@climate.apache.org by sk...@apache.org on 2013/08/06 00:55:29 UTC
svn commit: r1510792 -
/incubator/climate/trunk/rcmet/src/main/python/rcmes/services/directory_helpers.py
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: