Return-Path: X-Original-To: apmail-incubator-allura-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-allura-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 4BA6710AA5 for ; Wed, 19 Feb 2014 19:18:52 +0000 (UTC) Received: (qmail 81707 invoked by uid 500); 19 Feb 2014 19:18:50 -0000 Delivered-To: apmail-incubator-allura-commits-archive@incubator.apache.org Received: (qmail 81652 invoked by uid 500); 19 Feb 2014 19:18:49 -0000 Mailing-List: contact allura-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: allura-dev@incubator.apache.org Delivered-To: mailing list allura-commits@incubator.apache.org Received: (qmail 81641 invoked by uid 99); 19 Feb 2014 19:18:49 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Feb 2014 19:18:49 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 2BF8492807E; Wed, 19 Feb 2014 19:18:49 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: johnsca@apache.org To: allura-commits@incubator.apache.org Date: Wed, 19 Feb 2014 19:18:49 -0000 Message-Id: <919e87e9fe0f40a3a1ba66d6e00e80d7@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [1/4] git commit: [#7185] Minor refactor for clarity Repository: incubator-allura Updated Branches: refs/heads/cj/7128 09f213800 -> c32547b42 [#7185] Minor refactor for clarity Signed-off-by: Cory Johns Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/6bb7fcf4 Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/6bb7fcf4 Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/6bb7fcf4 Branch: refs/heads/cj/7128 Commit: 6bb7fcf4d6e06e40568338de25ae4c86368fe8c6 Parents: 4e6149d Author: Cory Johns Authored: Wed Feb 19 18:43:11 2014 +0000 Committer: Cory Johns Committed: Wed Feb 19 18:50:33 2014 +0000 ---------------------------------------------------------------------- Allura/allura/lib/widgets/project_list.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/6bb7fcf4/Allura/allura/lib/widgets/project_list.py ---------------------------------------------------------------------- diff --git a/Allura/allura/lib/widgets/project_list.py b/Allura/allura/lib/widgets/project_list.py index d89393a..cc2b933 100644 --- a/Allura/allura/lib/widgets/project_list.py +++ b/Allura/allura/lib/widgets/project_list.py @@ -19,6 +19,7 @@ import ew as ew_core import ew.jinja2_ew as ew from pylons import tmpl_context as c +from paste.deploy.converters import asbool from allura import model as M from allura.lib.security import Credentials @@ -127,13 +128,8 @@ class ProjectList(ew_core.Widget): cred.load_user_roles(c.user._id, *[p._id for p in projects]) cred.load_project_roles(*[p._id for p in projects]) - true_list = ['true', 't', '1', 'yes', 'y'] for opt in ['show_proj_icon', 'show_download_button', 'show_awards_banner']: - if type(response[opt]) == unicode: - if response[opt].lower() in true_list: - response[opt] = True - else: - response[opt] = False + response[opt] = asbool(response[opt]) if response['sitemaps'] is None and response['display_mode'] != 'list': response['sitemaps'] = M.Project.menus(projects)