From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 083A1138A1A for ; Mon, 2 Feb 2015 23:49:23 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 768ECE0930; Mon, 2 Feb 2015 23:49:22 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 28021E0930 for ; Mon, 2 Feb 2015 23:49:22 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id D9DF034076C for ; Mon, 2 Feb 2015 23:49:20 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id EAD1510ED1 for ; Mon, 2 Feb 2015 23:49:16 +0000 (UTC) From: "Devan Franchini" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Devan Franchini" Message-ID: <1422920864.322b86611f1bb05aa20f30c3576faf7e4dfd7ae6.twitch153@gentoo> Subject: [gentoo-commits] proj/layman:master commit in: layman/laymanator/ X-VCS-Repository: proj/layman X-VCS-Files: layman/laymanator/__init__.py X-VCS-Directories: layman/laymanator/ X-VCS-Committer: twitch153 X-VCS-Committer-Name: Devan Franchini X-VCS-Revision: 322b86611f1bb05aa20f30c3576faf7e4dfd7ae6 X-VCS-Branch: master Date: Mon, 2 Feb 2015 23:49:16 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 2c9695a7-bfbf-41b6-952c-a595761d287b X-Archives-Hash: 3f53db05202df8d6df961a14cef401ec commit: 322b86611f1bb05aa20f30c3576faf7e4dfd7ae6 Author: Devan Franchini gentoo org> AuthorDate: Mon Feb 2 23:47:39 2015 +0000 Commit: Devan Franchini gentoo org> CommitDate: Mon Feb 2 23:47:44 2015 +0000 URL: http://sources.gentoo.org/gitweb/?p=proj/layman.git;a=commit;h=322b8661 laymanator/__init__.py: Modifies method in which config_class is set Also removes unnecessary debug code that will not be used in production --- layman/laymanator/__init__.py | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/layman/laymanator/__init__.py b/layman/laymanator/__init__.py index 3d37fb9..62540ba 100644 --- a/layman/laymanator/__init__.py +++ b/layman/laymanator/__init__.py @@ -10,21 +10,12 @@ import os from portage.sync.config_checks import CheckSyncConfig -DEFAULT_CLASS = 'Layman' -AVAILABLE_CLASSES = [ 'Layman', 'PyLayman'] -options = {'1': 'Layman', '2': 'PyLayman'} - - -config_class = DEFAULT_CLASS try: - test_param = os.environ["TESTIT"] - if str(test_param) in options: - config_class = options[test_param] -except KeyError: - pass - + import layman + config_class = 'PyLayman' +except ImportError: + config_class = 'Layman' -print("Using config class: " + config_class) module_spec = { 'name': 'laymanator',