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 5B7A813888F for ; Tue, 6 Oct 2015 04:06:39 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id AD43C21C024; Tue, 6 Oct 2015 04:06:37 +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 5EFC421C024 for ; Tue, 6 Oct 2015 04:06:37 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 7DE37340702 for ; Tue, 6 Oct 2015 04:06:35 +0000 (UTC) From: Mike Frysinger To: gentoo-catalyst@lists.gentoo.org Subject: [gentoo-catalyst] [PATCH] lint: fix up unused variables Date: Tue, 6 Oct 2015 00:06:33 -0400 Message-Id: <1444104393-16018-1-git-send-email-vapier@gentoo.org> X-Mailer: git-send-email 2.5.2 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: 03d3099b-6575-47fe-841b-e9d322e84307 X-Archives-Hash: a937dee3b50ec953f8d4091c8fb1e31a This variables aren't actually used which the linter likes to warn about, so add a _ prefix to their name to silence the warnings. --- catalyst/base/resume.py | 2 +- catalyst/main.py | 2 +- catalyst/support.py | 2 +- catalyst/targets/netboot.py | 5 +++-- setup.py | 2 +- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/catalyst/base/resume.py b/catalyst/base/resume.py index 608f574..e3f03e7 100644 --- a/catalyst/base/resume.py +++ b/catalyst/base/resume.py @@ -23,7 +23,7 @@ class AutoResumeError(Exception): def __init__(self, message, print_traceback=False): if message: if print_traceback: - (type,value)=sys.exc_info()[:2] + (_type, value) = sys.exc_info()[:2] if value!=None: print print "Traceback values found. listing..." diff --git a/catalyst/main.py b/catalyst/main.py index dfa0609..04f689e 100644 --- a/catalyst/main.py +++ b/catalyst/main.py @@ -182,7 +182,7 @@ def 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",\ + 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: diff --git a/catalyst/support.py b/catalyst/support.py index 5563a15..a879eaf 100644 --- a/catalyst/support.py +++ b/catalyst/support.py @@ -88,7 +88,7 @@ class CatalystError(Exception): def __init__(self, message, print_traceback=False): if message: if print_traceback: - (type,value)=sys.exc_info()[:2] + (_type, value) = sys.exc_info()[:2] if value!=None: print print "Traceback values found. listing..." diff --git a/catalyst/targets/netboot.py b/catalyst/targets/netboot.py index c41ed59..b0e322c 100644 --- a/catalyst/targets/netboot.py +++ b/catalyst/targets/netboot.py @@ -31,11 +31,12 @@ class netboot(StageBase): self.required_values=[] try: + # XXX: This code does nothing because the for loop below is disabled. if "netboot/packages" in addlargs: if type(addlargs["netboot/packages"]) == types.StringType: - loopy=[addlargs["netboot/packages"]] + _loopy = [addlargs["netboot/packages"]] else: - loopy=addlargs["netboot/packages"] + _loopy = addlargs["netboot/packages"] # for x in loopy: # self.required_values.append("netboot/packages/"+x+"/files") diff --git a/setup.py b/setup.py index feca894..27ed2de 100755 --- a/setup.py +++ b/setup.py @@ -34,7 +34,7 @@ def _files(prefix, root): Yielding `(target_dir, (file_source_paths, ...))` tuples. """ - for dirpath, dirnames, filenames in _os.walk(root): + for dirpath, _dirnames, filenames in _os.walk(root): reldir = _os.path.relpath(dirpath, root) install_directory = _posix_path( _os.path.join(prefix, reldir)) -- 2.5.2