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 6FFEB138AD8 for ; Thu, 26 Feb 2015 19:25:37 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DB291E099E; Thu, 26 Feb 2015 19:25:36 +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 6A497E099E for ; Thu, 26 Feb 2015 19:25:36 +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 2727C340B50 for ; Thu, 26 Feb 2015 19:25:35 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 52932129DC for ; Thu, 26 Feb 2015 19:25:32 +0000 (UTC) From: "Brian Dolbec" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Brian Dolbec" Message-ID: <1424978121.32df09409b29b93bb89f930452a4f0ad52e8fcc5.dolsen@gentoo> Subject: [gentoo-commits] proj/catalyst:pending commit in: catalyst/ X-VCS-Repository: proj/catalyst X-VCS-Files: catalyst/main.py X-VCS-Directories: catalyst/ X-VCS-Committer: dolsen X-VCS-Committer-Name: Brian Dolbec X-VCS-Revision: 32df09409b29b93bb89f930452a4f0ad52e8fcc5 X-VCS-Branch: pending Date: Thu, 26 Feb 2015 19:25:32 +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: 46a82aab-22b0-40d3-a117-81780a03ecda X-Archives-Hash: 87273a3255cfc1cc2be605a3f6125c6a commit: 32df09409b29b93bb89f930452a4f0ad52e8fcc5 Author: Brian Dolbec gentoo org> AuthorDate: Tue Jun 11 16:07:03 2013 +0000 Commit: Brian Dolbec gentoo org> CommitDate: Thu Feb 26 19:15:21 2015 +0000 URL: http://sources.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=32df0940 fix '-' in stage names for python imports --- catalyst/main.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/catalyst/main.py b/catalyst/main.py index ae0abae..fc1681c 100644 --- a/catalyst/main.py +++ b/catalyst/main.py @@ -153,11 +153,12 @@ def import_module(target): def build_target(addlargs): try: - module = import_module(addlargs["target"]) - target = getattr(module, addlargs["target"])(conf_values, addlargs) + target = addlargs["target"].replace('-', '_') + module = import_module(target) + target = getattr(module, target)(conf_values, addlargs) except AttributeError: raise CatalystError( - "Target \"%s\" not available." % addlargs["target"], + "Target \"%s\" not available." % target, print_traceback=True) try: 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 2BFD1138ADA for ; Thu, 26 Feb 2015 20:13:16 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E5369E090F; Thu, 26 Feb 2015 20:13:02 +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 8DE6DE090F for ; Thu, 26 Feb 2015 20:13:02 +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 B1BD0340C4B for ; Thu, 26 Feb 2015 20:13:01 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 6FEE9129ED for ; Thu, 26 Feb 2015 20:12:44 +0000 (UTC) From: "Brian Dolbec" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Brian Dolbec" Message-ID: <1424978121.32df09409b29b93bb89f930452a4f0ad52e8fcc5.dolsen@gentoo> Subject: [gentoo-commits] proj/catalyst:master commit in: catalyst/ X-VCS-Repository: proj/catalyst X-VCS-Files: catalyst/main.py X-VCS-Directories: catalyst/ X-VCS-Committer: dolsen X-VCS-Committer-Name: Brian Dolbec X-VCS-Revision: 32df09409b29b93bb89f930452a4f0ad52e8fcc5 X-VCS-Branch: master Date: Thu, 26 Feb 2015 20:12:44 +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: 84b12f66-f844-497d-b1ef-a4526754eb98 X-Archives-Hash: d640baae8b87c5a6ba0a215f193e2766 Message-ID: <20150226201244.aA2pcBY_LmY93ipZDQjmWNogeTi28c1Bg7mWYFRa0gA@z> commit: 32df09409b29b93bb89f930452a4f0ad52e8fcc5 Author: Brian Dolbec gentoo org> AuthorDate: Tue Jun 11 16:07:03 2013 +0000 Commit: Brian Dolbec gentoo org> CommitDate: Thu Feb 26 19:15:21 2015 +0000 URL: http://sources.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=32df0940 fix '-' in stage names for python imports --- catalyst/main.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/catalyst/main.py b/catalyst/main.py index ae0abae..fc1681c 100644 --- a/catalyst/main.py +++ b/catalyst/main.py @@ -153,11 +153,12 @@ def import_module(target): def build_target(addlargs): try: - module = import_module(addlargs["target"]) - target = getattr(module, addlargs["target"])(conf_values, addlargs) + target = addlargs["target"].replace('-', '_') + module = import_module(target) + target = getattr(module, target)(conf_values, addlargs) except AttributeError: raise CatalystError( - "Target \"%s\" not available." % addlargs["target"], + "Target \"%s\" not available." % target, print_traceback=True) try: