Return-Path: X-Original-To: apmail-climate-commits-archive@minotaur.apache.org Delivered-To: apmail-climate-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6C9FECA38 for ; Sat, 1 Feb 2014 23:58:08 +0000 (UTC) Received: (qmail 93592 invoked by uid 500); 1 Feb 2014 23:58:08 -0000 Delivered-To: apmail-climate-commits-archive@climate.apache.org Received: (qmail 93561 invoked by uid 500); 1 Feb 2014 23:58:07 -0000 Mailing-List: contact commits-help@climate.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@climate.incubator.apache.org Delivered-To: mailing list commits@climate.incubator.apache.org Received: (qmail 93549 invoked by uid 99); 1 Feb 2014 23:58:07 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 01 Feb 2014 23:58:07 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 01 Feb 2014 23:58:06 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id B46482388C90; Sat, 1 Feb 2014 23:57:36 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1563531 - /incubator/climate/trunk/ocw-ui/backend/directory_helpers.py Date: Sat, 01 Feb 2014 23:57:36 -0000 To: commits@climate.incubator.apache.org From: joyce@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20140201235736.B46482388C90@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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