From patchwork Thu Jan 10 23:23:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Pfaff X-Patchwork-Id: 1023275 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ovn.org Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43bMXn5WN9z9s7h for ; Fri, 11 Jan 2019 10:24:57 +1100 (AEDT) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 7E37F13C6; Thu, 10 Jan 2019 23:24:01 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 0D1D313B7 for ; Thu, 10 Jan 2019 23:24:00 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 5ACB584E for ; Thu, 10 Jan 2019 23:23:59 +0000 (UTC) X-Originating-IP: 208.91.3.26 Received: from sigabrt.benpfaff.org (unknown [208.91.3.26]) (Authenticated sender: blp@ovn.org) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id D586B60002; Thu, 10 Jan 2019 23:23:56 +0000 (UTC) From: Ben Pfaff To: dev@openvswitch.org Date: Thu, 10 Jan 2019 15:23:47 -0800 Message-Id: <20190110232347.6574-4-blp@ovn.org> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20190110232347.6574-1-blp@ovn.org> References: <20190110232347.6574-1-blp@ovn.org> X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Cc: Ben Pfaff Subject: [ovs-dev] [PATCH v2 3/3] python: Avoid flake8 warning for unused variables. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org Signed-off-by: Ben Pfaff --- python/ovs/socket_util.py | 2 +- python/ovs/stream.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/python/ovs/socket_util.py b/python/ovs/socket_util.py index 2596ddefdb8c..8f9d31825c92 100644 --- a/python/ovs/socket_util.py +++ b/python/ovs/socket_util.py @@ -90,7 +90,7 @@ def make_unix_socket(style, nonblock, bind_path, connect_path, short=False): try: os.fchmod(sock.fileno(), 0o700) - except OSError as e: + except OSError: pass if connect_path is not None: try: diff --git a/python/ovs/stream.py b/python/ovs/stream.py index cdfcc399e512..e948427734a8 100644 --- a/python/ovs/stream.py +++ b/python/ovs/stream.py @@ -174,7 +174,7 @@ class Stream(object): try: winutils.set_pipe_mode(npipe, win32pipe.PIPE_READMODE_BYTE) - except pywintypes.error as e: + except pywintypes.error: return errno.ENOENT, None except pywintypes.error as e: if e.winerror == winutils.winerror.ERROR_PIPE_BUSY: