climate-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jo...@apache.org
Subject svn commit: r1563531 - /incubator/climate/trunk/ocw-ui/backend/directory_helpers.py
Date Sat, 01 Feb 2014 23:57:36 GMT
Author: joyce
Date: Sat Feb  1 23:57:36 2014
New Revision: 1563531

URL: http://svn.apache.org/r1563531
Log:
CLIMATE-326 - Minor /dir/list update

Modified:
    incubator/climate/trunk/ocw-ui/backend/directory_helpers.py

Modified: incubator/climate/trunk/ocw-ui/backend/directory_helpers.py
URL: http://svn.apache.org/viewvc/incubator/climate/trunk/ocw-ui/backend/directory_helpers.py?rev=1563531&r1=1563530&r2=1563531&view=diff
==============================================================================
--- incubator/climate/trunk/ocw-ui/backend/directory_helpers.py (original)
+++ incubator/climate/trunk/ocw-ui/backend/directory_helpers.py Sat Feb  1 23:57:36 2014
@@ -56,15 +56,17 @@ def get_directory_info(dir_path='/'):
 
         {'listing': []}
     '''
+    dir_info = []
+
     try:
         clean_path = _get_clean_directory_path(PATH_LEADER, dir_path)
         dir_listing = os.listdir(clean_path)
     except:
         # ValueError - dir_path couldn't be 'cleaned'
         # OSError - clean_path is not a directory
-        dir_info = []
+        # Either way, we don't have anything to list for the directory!
+        pass
     else:
-        dir_info = []
         for obj in dir_listing:
             # Ignore hidden files
             if obj[0] == '.': continue



Mime
View raw message