From d3a690580b62d9002080da833283bd35e683cc52 Mon Sep 17 00:00:00 2001 From: Vladimir Romanov Date: Wed, 15 May 2013 11:01:05 -0700 Subject: [PATCH] Remove unused imports, bug #469022 --- bin/clean_locks | 2 -- bin/dispatch-conf | 6 ++---- bin/emerge | 1 - 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/bin/clean_locks b/bin/clean_locks index 0a9791852..184e80cb4 100755 --- a/bin/clean_locks +++ b/bin/clean_locks @@ -10,10 +10,8 @@ pym_path = osp.join(osp.dirname(osp.dirname(osp.realpath(__file__))), "pym") sys.path.insert(0, pym_path) import portage portage._internal_caller = True -from portage import os if not sys.argv[1:] or "--help" in sys.argv or "-h" in sys.argv: - import portage print() print("You must specify directories with hardlink-locks to clean.") print("You may optionally specify --force, which will remove all") diff --git a/bin/dispatch-conf b/bin/dispatch-conf index e44c0eac8..90b407a5c 100755 --- a/bin/dispatch-conf +++ b/bin/dispatch-conf @@ -22,10 +22,9 @@ sys.path.insert(0, pym_path) import portage portage._internal_caller = True from portage import os -from portage import dispatch_conf from portage import _unicode_decode from portage.dispatch_conf import diffstatusoutput -from portage.process import find_binary +from portage.process import find_binary, spawn FIND_EXTANT_CONFIGS = "find '%s' %s -name '._cfg????_%s' ! -name '.*~' ! -iname '.*.bak' -print" DIFF_CONTENTS = "diff -Nu '%s' '%s'" @@ -428,7 +427,7 @@ class dispatch: def getch (): # from ASPN - Danny Yoo # - import sys, tty, termios + import tty, termios fd = sys.stdin.fileno() old_settings = termios.tcgetattr(fd) @@ -453,7 +452,6 @@ def clear_screen(): pass os.system("clear 2>/dev/null") -from portage.process import find_binary, spawn shell = os.environ.get("SHELL") if not shell or not os.access(shell, os.EX_OK): shell = find_binary("sh") diff --git a/bin/emerge b/bin/emerge index fc85d584e..a7654bb38 100755 --- a/bin/emerge +++ b/bin/emerge @@ -45,7 +45,6 @@ try: from _emerge.main import emerge_main if __name__ == "__main__": - import sys from portage.exception import ParseError, PermissionDenied try: retval = emerge_main() -- 2.26.2