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 8986B138247 for ; Thu, 21 Nov 2013 09:06:48 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 10395E0A40; Thu, 21 Nov 2013 09:06:39 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 17FF4E0A43 for ; Thu, 21 Nov 2013 09:06:37 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 2272833F30F for ; Thu, 21 Nov 2013 09:06:36 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 88765E54D8 for ; Thu, 21 Nov 2013 09:06:33 +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: <1385024411.bbb3acb456b5eee93d8baa2c7fe8660c2ef9ddda.dol-sen@gentoo> Subject: [gentoo-commits] proj/catalyst:3.0 commit in: catalyst/ X-VCS-Repository: proj/catalyst X-VCS-Files: catalyst/main.py X-VCS-Directories: catalyst/ X-VCS-Committer: dol-sen X-VCS-Committer-Name: Brian Dolbec X-VCS-Revision: bbb3acb456b5eee93d8baa2c7fe8660c2ef9ddda X-VCS-Branch: 3.0 Date: Thu, 21 Nov 2013 09:06:33 +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: 77f5ff41-5314-4612-8c8e-fad4bcfde552 X-Archives-Hash: bed4d23d2633b9c7385760dc5c436f60 commit: bbb3acb456b5eee93d8baa2c7fe8660c2ef9ddda Author: Brian Dolbec gentoo org> AuthorDate: Tue Jun 11 16:07:03 2013 +0000 Commit: Brian Dolbec gmail com> CommitDate: Thu Nov 21 09:00:11 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=bbb3acb4 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 26e0c8b..3f37ad0 100644 --- a/catalyst/main.py +++ b/catalyst/main.py @@ -157,11 +157,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: