From 95bab821b3af268d23e9cf5f9da3dd7f1e396949 Mon Sep 17 00:00:00 2001 From: practicalswift Date: Tue, 10 Jan 2017 23:30:14 +0100 Subject: [PATCH] Remove unused Python imports --- contrib/devtools/github-merge.py | 2 +- contrib/devtools/test-security-check.py | 1 - contrib/linearize/linearize-data.py | 6 ------ contrib/linearize/linearize-hashes.py | 1 - contrib/zmq/zmq_sub.py | 1 - qa/rpc-tests/nodehandling.py | 1 - qa/rpc-tests/p2p-mempool.py | 1 - qa/rpc-tests/zmq_test.py | 3 --- share/qt/extract_strings_qt.py | 1 - src/test/bitcoin-util-test.py | 1 - 10 files changed, 1 insertion(+), 17 deletions(-) diff --git a/contrib/devtools/github-merge.py b/contrib/devtools/github-merge.py index aae966a8f6..0cee0921b1 100755 --- a/contrib/devtools/github-merge.py +++ b/contrib/devtools/github-merge.py @@ -15,7 +15,7 @@ # In case of a clean merge that is accepted by the user, the local branch with # name $BRANCH is overwritten with the merged result, and optionally pushed. from __future__ import division,print_function,unicode_literals -import os,sys +import os from sys import stdin,stdout,stderr import argparse import subprocess diff --git a/contrib/devtools/test-security-check.py b/contrib/devtools/test-security-check.py index c0f120392e..18f9835faa 100755 --- a/contrib/devtools/test-security-check.py +++ b/contrib/devtools/test-security-check.py @@ -7,7 +7,6 @@ Test script for security-check.py ''' from __future__ import division,print_function import subprocess -import sys import unittest def write_testcode(filename): diff --git a/contrib/linearize/linearize-data.py b/contrib/linearize/linearize-data.py index 043bf2e814..3fdec134b8 100755 --- a/contrib/linearize/linearize-data.py +++ b/contrib/linearize/linearize-data.py @@ -8,16 +8,10 @@ # from __future__ import print_function, division -try: # Python 3 - import http.client as httplib -except ImportError: # Python 2 - import httplib -import json import struct import re import os import os.path -import base64 import sys import hashlib import datetime diff --git a/contrib/linearize/linearize-hashes.py b/contrib/linearize/linearize-hashes.py index f749da5396..00a54d0820 100755 --- a/contrib/linearize/linearize-hashes.py +++ b/contrib/linearize/linearize-hashes.py @@ -13,7 +13,6 @@ try: # Python 3 except ImportError: # Python 2 import httplib import json -import struct import re import base64 import sys diff --git a/contrib/zmq/zmq_sub.py b/contrib/zmq/zmq_sub.py index 3dea5e3c14..6f57aa47e9 100755 --- a/contrib/zmq/zmq_sub.py +++ b/contrib/zmq/zmq_sub.py @@ -3,7 +3,6 @@ # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. -import array import binascii import zmq import struct diff --git a/qa/rpc-tests/nodehandling.py b/qa/rpc-tests/nodehandling.py index e9682c4908..7313c79b54 100755 --- a/qa/rpc-tests/nodehandling.py +++ b/qa/rpc-tests/nodehandling.py @@ -10,7 +10,6 @@ from test_framework.test_framework import BitcoinTestFramework from test_framework.util import * -import http.client import urllib.parse class NodeHandlingTest (BitcoinTestFramework): diff --git a/qa/rpc-tests/p2p-mempool.py b/qa/rpc-tests/p2p-mempool.py index 382d7f1e82..1fd125fdcd 100755 --- a/qa/rpc-tests/p2p-mempool.py +++ b/qa/rpc-tests/p2p-mempool.py @@ -6,7 +6,6 @@ from test_framework.mininode import * from test_framework.test_framework import BitcoinTestFramework from test_framework.util import * -import time class TestNode(NodeConnCB): def __init__(self): diff --git a/qa/rpc-tests/zmq_test.py b/qa/rpc-tests/zmq_test.py index 3a116317fe..e9afb2b09a 100755 --- a/qa/rpc-tests/zmq_test.py +++ b/qa/rpc-tests/zmq_test.py @@ -12,9 +12,6 @@ from test_framework.util import * import zmq import struct -import http.client -import urllib.parse - class ZMQTest (BitcoinTestFramework): def __init__(self): diff --git a/share/qt/extract_strings_qt.py b/share/qt/extract_strings_qt.py index 92e0df259e..5492fdb8c5 100755 --- a/share/qt/extract_strings_qt.py +++ b/share/qt/extract_strings_qt.py @@ -8,7 +8,6 @@ they can be picked up by Qt linguist. ''' from __future__ import division,print_function,unicode_literals from subprocess import Popen, PIPE -import glob import operator import os import sys diff --git a/src/test/bitcoin-util-test.py b/src/test/bitcoin-util-test.py index 1c090b3f3f..e2087187aa 100755 --- a/src/test/bitcoin-util-test.py +++ b/src/test/bitcoin-util-test.py @@ -5,7 +5,6 @@ # file COPYING or http://www.opensource.org/licenses/mit-license.php. from __future__ import division,print_function,unicode_literals import os -import sys import bctest import buildenv import argparse