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 7D7F6138247 for ; Sat, 14 Dec 2013 22:25:56 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B77A2E0B40; Sat, 14 Dec 2013 22:24:49 +0000 (UTC) Received: from qmta06.westchester.pa.mail.comcast.net (qmta06.westchester.pa.mail.comcast.net [76.96.62.56]) by pigeon.gentoo.org (Postfix) with ESMTP id 99C3AE0B33 for ; Sat, 14 Dec 2013 22:24:48 +0000 (UTC) Received: from omta23.westchester.pa.mail.comcast.net ([76.96.62.74]) by qmta06.westchester.pa.mail.comcast.net with comcast id 1Zzs1n0031c6gX856aQoEV; Sat, 14 Dec 2013 22:24:48 +0000 Received: from odin.tremily.us ([24.18.63.50]) by omta23.westchester.pa.mail.comcast.net with comcast id 1aQn1n00A152l3L3jaQnUx; Sat, 14 Dec 2013 22:24:48 +0000 Received: by odin.tremily.us (Postfix, from userid 1000) id DA12DD68B81; Sat, 14 Dec 2013 14:24:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tremily.us; s=odin; t=1387059886; bh=+pcMSItoTC5DRRpFHfe7BO/QOhJ2D99AjGX9lwkHAeU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:In-Reply-To: References; b=gPK8i4SrP0OVDCyVG28m77Eff3XoePTEUaiSVOjJPXvyKB3w8fX4m7NCMWeA3V0si k3n3aekGnQtd1SgymkgBASOnNgaeUlumn+lke94+E2Au7haqLR1+7i26YQx1PakcAb 9kyJpXt3Gj/sjCvH+04wG8vNIaOaT7sq3VnzupKQ= From: "W. Trevor King" To: Catalyst Cc: Brian Dolbec , "W. Trevor King" Subject: [gentoo-catalyst] [PATCH v2 21/21] catalyst: cleanup long lines Date: Sat, 14 Dec 2013 14:24:29 -0800 Message-Id: X-Mailer: git-send-email 1.8.3.2 In-Reply-To: References: In-Reply-To: References: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20121106; t=1387059888; bh=sAg+Fee/d9pj7ObJXGNhBZjXstmD9gqVfUj8GLEy0jw=; h=Received:Received:Received:From:To:Subject:Date:Message-Id; b=skwMxu4nj4ASfX9faiGQJqjwU9I3+0pSOF3brjWWU119gZxXrtF58E6EccOiJ3uTU T0Gvakx0zg8NDy5tP7Wuhu1w6vft2TfyJ67/IkPQGQbjxBH3+8BKW2DTKxzIkfDzc9 QqNSNP9wDl93gD0HjV/mcelohYrHciBkTObjpNttRH+WXquDm8CVhDfl3hPKnb/vsQ +MpKVQ0eHkzE4suoBoJ3ixH2Ln1qNetcCvcHsItqtfQg3V7FVIUPSnSdPaYCXgXRIH 9tVeN4Ywy8WkjM2sZKGeyVU2JDb3j7jhg7O7pDSVagyXhLyWjaCm3zQn3GVj7FT0dE 8OG/QUtU8v5PA== Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-catalyst@lists.gentoo.org Reply-to: gentoo-catalyst@lists.gentoo.org X-Archives-Salt: d169d999-41f5-4460-9904-f0000fd8378e X-Archives-Hash: f11480edeeab4a6bdc43619964ab82b5 From: Brian Dolbec W. Trevor King: Refactored Git history for Brian Dolbec's content changes. Signed-off-by: W. Trevor King --- catalyst | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/catalyst b/catalyst index 38fbdfb..3983155 100755 --- a/catalyst +++ b/catalyst @@ -80,7 +80,8 @@ def parse_config(myconfig): # first, try the one passed (presumably from the cmdline) if myconfig: if os.path.exists(myconfig): - print "Using command line specified Catalyst configuration file, "+myconfig + print "Using command line specified Catalyst configuration file, " + \ + myconfig config_file=myconfig else: @@ -90,7 +91,8 @@ def parse_config(myconfig): # next, try the default location elif os.path.exists("/etc/catalyst/catalyst.conf"): - print "Using default Catalyst configuration file, /etc/catalyst/catalyst.conf" + print "Using default Catalyst configuration file," + \ + " /etc/catalyst/catalyst.conf" config_file="/etc/catalyst/catalyst.conf" # can't find a config file (we are screwed), so bail out @@ -186,14 +188,16 @@ def parse_config(myconfig): conf_values["port_logdir"]=myconf["port_logdir"]; def import_modules(): - # import catalyst's own modules (i.e. catalyst_support and the arch modules) + # import catalyst's own modules + # (i.e. catalyst_support and the arch modules) targetmap={} try: for x in required_build_targets: try: fh=open(conf_values["sharedir"]+"/modules/"+x+".py") - module=imp.load_module(x,fh,"modules/"+x+".py",(".py","r",imp.PY_SOURCE)) + module = imp.load_module(x,fh,"modules/" + x + ".py", + (".py","r",imp.PY_SOURCE)) fh.close() except IOError: @@ -203,7 +207,8 @@ def import_modules(): for x in valid_build_targets: try: fh=open(conf_values["sharedir"]+"/modules/"+x+".py") - module=imp.load_module(x,fh,"modules/"+x+".py",(".py","r",imp.PY_SOURCE)) + module = imp.load_module(x,fh,"modules/" + x + ".py", + (".py","r",imp.PY_SOURCE)) module.register(targetmap) fh.close() @@ -221,15 +226,17 @@ def import_modules(): def build_target(addlargs, targetmap): try: if addlargs["target"] not in targetmap: - raise CatalystError,"Target \""+addlargs["target"]+"\" not available." + raise CatalystError, \ + "Target \"%s\" not available." % addlargs["target"] mytarget=targetmap[addlargs["target"]](conf_values, addlargs) mytarget.run() except: - modules.catalyst.util.print_traceback() - print "!!! catalyst: Error encountered during run of target " + addlargs["target"] + catalyst.util.print_traceback() + print "!!! catalyst: Error encountered during run of target " + \ + addlargs["target"] sys.exit(1) if __name__ == "__main__": @@ -248,8 +255,12 @@ if __name__ == "__main__": # parse out the command line arguments try: - opts,args = getopt.getopt(sys.argv[1:], "apPThvdc:C:f:FVs:", ["purge", "purgeonly", "purgetmponly", "help", "version", "debug",\ - "clear-autoresume", "config=", "cli=", "file=", "fetch", "verbose","snapshot="]) + opts,args = getopt.getopt(sys.argv[1:], "apPThvdc:C:f:FVs:", + ["purge", "purgeonly", "purgetmponly", "help", "version", "debug", + "clear-autoresume", "config=", "cli=", "file=", "fetch", + "verbose","snapshot=" + ] + ) except getopt.GetoptError: usage() -- 1.8.3.2