From 89ede72fca942e7ceffd414e795e3d2c5e09ed0a Mon Sep 17 00:00:00 2001 From: Sakthipriyan Vairamani Date: Wed, 29 Jun 2016 23:48:43 +0530 Subject: [PATCH] tools: remove unnecessary imports and assignments PR-URL: https://github.com/nodejs/node/pull/7483 Reviewed-By: Ben Noordhuis Reviewed-By: James M Snell Reviewed-By: Anna Henningsen --- test/message/testcfg.py | 2 +- test/testpy/__init__.py | 3 --- test/timers/testcfg.py | 6 +----- tools/configure.d/nodedownload.py | 2 +- tools/icu/shrink-icu-src.py | 4 ---- tools/specialize_node_d.py | 2 -- tools/test.py | 1 - 7 files changed, 3 insertions(+), 17 deletions(-) diff --git a/test/message/testcfg.py b/test/message/testcfg.py index 60e64e29f7..7183ab333d 100644 --- a/test/message/testcfg.py +++ b/test/message/testcfg.py @@ -27,7 +27,7 @@ import test import os -from os.path import join, dirname, exists, basename, isdir +from os.path import join, exists, basename, isdir import re FLAGS_PATTERN = re.compile(r"//\s+Flags:(.*)") diff --git a/test/testpy/__init__.py b/test/testpy/__init__.py index b1f1519e91..9fff0b969c 100644 --- a/test/testpy/__init__.py +++ b/test/testpy/__init__.py @@ -27,9 +27,6 @@ import test import os -import shutil -from os import mkdir -from glob import glob from os.path import join, dirname, exists import re diff --git a/test/timers/testcfg.py b/test/timers/testcfg.py index a7c248fc08..b766db1691 100644 --- a/test/timers/testcfg.py +++ b/test/timers/testcfg.py @@ -27,11 +27,7 @@ import test import os -import shutil -from shutil import rmtree -from os import mkdir -from glob import glob -from os.path import join, dirname, exists +from os.path import join, exists import re import shlex diff --git a/tools/configure.d/nodedownload.py b/tools/configure.d/nodedownload.py index e24efd865f..5cf8e0dbd6 100644 --- a/tools/configure.d/nodedownload.py +++ b/tools/configure.d/nodedownload.py @@ -35,7 +35,7 @@ def retrievefile(url, targetfile): try: sys.stdout.write(' <%s>\nConnecting...\r' % url) sys.stdout.flush() - msg = ConfigOpener().retrieve(url, targetfile, reporthook=reporthook) + ConfigOpener().retrieve(url, targetfile, reporthook=reporthook) print '' # clear the line return targetfile except: diff --git a/tools/icu/shrink-icu-src.py b/tools/icu/shrink-icu-src.py index 1760b4ff47..4a5f06d4a3 100644 --- a/tools/icu/shrink-icu-src.py +++ b/tools/icu/shrink-icu-src.py @@ -1,13 +1,9 @@ #!/usr/bin/env python import optparse import os -import pprint import re -import shlex -import subprocess import sys import shutil -import string parser = optparse.OptionParser() diff --git a/tools/specialize_node_d.py b/tools/specialize_node_d.py index 0ee505ae91..bb5ef5a57c 100755 --- a/tools/specialize_node_d.py +++ b/tools/specialize_node_d.py @@ -7,9 +7,7 @@ # import re -import subprocess import sys -import errno if len(sys.argv) != 5: print "usage: specialize_node_d.py outfile src/node.d flavor arch" diff --git a/tools/test.py b/tools/test.py index 3efafd9548..bfc47ab4c9 100755 --- a/tools/test.py +++ b/tools/test.py @@ -32,7 +32,6 @@ import imp import logging import optparse import os -import platform import re import signal import subprocess