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 E51621387B1 for ; Fri, 22 Nov 2013 07:13:58 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id F3967E0ADD; Fri, 22 Nov 2013 07:13:37 +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 31A36E0ADD for ; Fri, 22 Nov 2013 07:13:32 +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 EFF1033F336 for ; Fri, 22 Nov 2013 07:13:29 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id BB5F6D0115 for ; Fri, 22 Nov 2013 07:13:27 +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: <1385100155.52273364703de20b40f1a047592e0e9924409851.dol-sen@gentoo> Subject: [gentoo-commits] proj/catalyst:rewrite-on-master 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: 52273364703de20b40f1a047592e0e9924409851 X-VCS-Branch: rewrite-on-master Date: Fri, 22 Nov 2013 07:13:27 +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: 569657fd-3707-49b3-9435-f9bfd815a22a X-Archives-Hash: 2e59a3953b45326502ff9d3109784328 commit: 52273364703de20b40f1a047592e0e9924409851 Author: Brian Dolbec gentoo org> AuthorDate: Tue Jun 11 16:07:03 2013 +0000 Commit: Brian Dolbec gmail com> CommitDate: Fri Nov 22 06:02:35 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=52273364 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 bf427a7..a47dff7 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: