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 5BCF613827E for ; Sat, 14 Dec 2013 03:28:48 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 0C8D3E0BCD; Sat, 14 Dec 2013 03:28:43 +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 77701E0BC4 for ; Sat, 14 Dec 2013 03:28:42 +0000 (UTC) Received: from big_daddy.dol-sen.ca (S010600222de111ff.vc.shawcable.net [96.49.5.156]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: dolsen) by smtp.gentoo.org (Postfix) with ESMTPSA id 9167633F4D7; Sat, 14 Dec 2013 03:28:41 +0000 (UTC) From: Brian Dolbec To: gentoo-catalyst@lists.gentoo.org Cc: Brian Dolbec Subject: [gentoo-catalyst] [PATCH 2/3] Remove unused variable new and an undefined variable s. Date: Fri, 13 Dec 2013 19:28:27 -0800 Message-Id: <1386991708-9385-3-git-send-email-dolsen@gentoo.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1386991708-9385-1-git-send-email-dolsen@gentoo.org> References: <1386991708-9385-1-git-send-email-dolsen@gentoo.org> 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: 2adab5b7-bb82-48f1-9af4-3bcf41eb306e X-Archives-Hash: 9bd6084d5100c53f6576a84d207a7ae9 Commit b3475906d5f51a21ecaf4ff048002a2f44face52 introduced an undefined variable "s". The code must always be hitting the general except: pass block. Seems useless, if not maybe it'll spit out a true error, so the real problem can be fixed. Removed it all. --- catalyst/support.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/catalyst/support.py b/catalyst/support.py index 0ddf98d..2133799 100644 --- a/catalyst/support.py +++ b/catalyst/support.py @@ -433,15 +433,7 @@ def spawn(mycommand,env={},raw_exit_code=False,opt_name=None,fd_pipes=None,retur if trg_fd[x] == src_fd[x]: continue if trg_fd[x] in src_fd[x+1:]: - new=os.dup2(trg_fd[x],max(src_fd) + 1) os.close(trg_fd[x]) - try: - while True: - src_fd[s.index(trg_fd[x])]=new - except SystemExit, e: - raise - except: - pass # transfer the fds to their final pre-exec position. for x in range(0,len(trg_fd)): -- 1.8.3.2