From patchwork Mon Dec 21 20:47:03 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Russell Bryant X-Patchwork-Id: 559699 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from archives.nicira.com (li376-54.members.linode.com [96.126.127.54]) by ozlabs.org (Postfix) with ESMTP id A87AA140323 for ; Tue, 22 Dec 2015 07:48:31 +1100 (AEDT) Received: from archives.nicira.com (localhost [127.0.0.1]) by archives.nicira.com (Postfix) with ESMTP id 4DE50105E6; Mon, 21 Dec 2015 12:48:09 -0800 (PST) X-Original-To: dev@openvswitch.org Delivered-To: dev@openvswitch.org Received: from mx3v3.cudamail.com (mx3.cudamail.com [64.34.241.5]) by archives.nicira.com (Postfix) with ESMTPS id CA9E8105D7 for ; Mon, 21 Dec 2015 12:48:07 -0800 (PST) Received: from bar4.cudamail.com (localhost [127.0.0.1]) by mx3v3.cudamail.com (Postfix) with ESMTPS id 634D6161B34 for ; Mon, 21 Dec 2015 13:48:07 -0700 (MST) X-ASG-Debug-ID: 1450730887-03dc213fed439450001-byXFYA Received: from mx3-pf3.cudamail.com ([192.168.14.3]) by bar4.cudamail.com with ESMTP id WqNPHWXSshD8pBtQ (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 21 Dec 2015 13:48:07 -0700 (MST) X-Barracuda-Envelope-From: russell@ovn.org X-Barracuda-RBL-Trusted-Forwarder: 192.168.14.3 Received: from unknown (HELO mx1.redhat.com) (209.132.183.28) by mx3-pf3.cudamail.com with ESMTPS (DHE-RSA-AES256-SHA encrypted); 21 Dec 2015 21:03:38 -0000 Received-SPF: neutral (mx3-pf3.cudamail.com: 209.132.183.28 is neither permitted nor denied by SPF record at ovn.org) X-Barracuda-Apparent-Source-IP: 209.132.183.28 X-Barracuda-RBL-IP: 209.132.183.28 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id DD5E8C0B7E3F; Mon, 21 Dec 2015 20:48:05 +0000 (UTC) Received: from x1c.redhat.com ([10.3.112.11]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id tBLKm0dQ002018; Mon, 21 Dec 2015 15:48:05 -0500 X-CudaMail-Envelope-Sender: russell@ovn.org From: Russell Bryant To: dev@openvswitch.org X-CudaMail-Whitelist-To: dev@openvswitch.org X-CudaMail-MID: CM-V3-1220053416 X-CudaMail-DTE: 122115 X-CudaMail-Originating-IP: 209.132.183.28 Date: Mon, 21 Dec 2015 15:47:03 -0500 X-ASG-Orig-Subj: [##CM-V3-1220053416##][PATCH 03/55] python: Remove unused imports and variables. Message-Id: <1450730875-18083-4-git-send-email-russell@ovn.org> In-Reply-To: <1450730875-18083-1-git-send-email-russell@ovn.org> References: <1450730875-18083-1-git-send-email-russell@ovn.org> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-Barracuda-Connect: UNKNOWN[192.168.14.3] X-Barracuda-Start-Time: 1450730887 X-Barracuda-Encrypted: DHE-RSA-AES256-SHA X-Barracuda-URL: https://web.cudamail.com:443/cgi-mod/mark.cgi X-ASG-Whitelist: Header =?UTF-8?B?eFwtY3VkYW1haWxcLXdoaXRlbGlzdFwtdG8=?= X-Virus-Scanned: by bsmtpd at cudamail.com X-Barracuda-BRTS-Status: 1 Subject: [ovs-dev] [PATCH 03/55] python: Remove unused imports and variables. X-BeenThere: dev@openvswitch.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dev-bounces@openvswitch.org Sender: "dev" Signed-off-by: Russell Bryant --- python/ovs/socket_util.py | 5 ++--- python/ovs/unixctl/client.py | 2 -- python/ovstest/vswitch.py | 3 --- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/python/ovs/socket_util.py b/python/ovs/socket_util.py index 3bd4750..a01c3aa 100644 --- a/python/ovs/socket_util.py +++ b/python/ovs/socket_util.py @@ -16,7 +16,6 @@ import errno import os import os.path import random -import select import socket import sys @@ -302,12 +301,12 @@ def set_dscp(sock, family, dscp): if family == socket.AF_INET: try: sock.setsockopt(socket.IPPROTO_IP, socket.IP_TOS, val) - except socket.error as e: + except socket.error: raise elif family == socket.AF_INET6: try: sock.setsockopt(socket.IPPROTO_IPV6, socket.IPV6_TCLASS, val) - except socket.error as e: + except socket.error: raise else: raise diff --git a/python/ovs/unixctl/client.py b/python/ovs/unixctl/client.py index 2176009..be6dee4 100644 --- a/python/ovs/unixctl/client.py +++ b/python/ovs/unixctl/client.py @@ -12,8 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -import copy -import errno import os import types diff --git a/python/ovstest/vswitch.py b/python/ovstest/vswitch.py index dd315e5..be66a2e 100644 --- a/python/ovstest/vswitch.py +++ b/python/ovstest/vswitch.py @@ -15,9 +15,6 @@ """ vswitch module allows its callers to interact with OVS DB. """ -import exceptions -import subprocess - import util