From af1e5dea3511c7e01f9a0a31f6e254d63848bed5 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 17 Feb 2020 14:58:37 -0500 Subject: [PATCH] resort a few module imports to follow PEP8 All the stdlib imports are supposed to come before any local imports. Change-Id: I10c0335ba2ff715fd34c9eb91bfe6560e904df08 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/255593 Tested-by: Mike Frysinger Reviewed-by: David Pursehouse --- git_config.py | 4 ++-- subcmds/abandon.py | 6 ++++-- subcmds/status.py | 9 ++++----- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/git_config.py b/git_config.py index 054f5c64..cee33e92 100644 --- a/git_config.py +++ b/git_config.py @@ -21,6 +21,7 @@ import errno import json import os import re +import signal import ssl import subprocess import sys @@ -41,7 +42,6 @@ else: urllib.request = urllib2 urllib.error = urllib2 -from signal import SIGTERM from error import GitError, UploadError import platform_utils from repo_trace import Trace @@ -494,7 +494,7 @@ def close_ssh(): for p in _master_processes: try: - os.kill(p.pid, SIGTERM) + os.kill(p.pid, signal.SIGTERM) p.wait() except OSError: pass diff --git a/subcmds/abandon.py b/subcmds/abandon.py index f3478129..5d56abf7 100644 --- a/subcmds/abandon.py +++ b/subcmds/abandon.py @@ -15,9 +15,11 @@ # limitations under the License. from __future__ import print_function -import sys -from command import Command + from collections import defaultdict +import sys + +from command import Command from git_command import git from progress import Progress diff --git a/subcmds/status.py b/subcmds/status.py index b594bd89..8537e6c5 100644 --- a/subcmds/status.py +++ b/subcmds/status.py @@ -16,6 +16,10 @@ from __future__ import print_function +import glob +import itertools +import os + from command import PagedCommand try: @@ -23,11 +27,6 @@ try: except ImportError: import dummy_threading as _threading -import glob - -import itertools -import os - from color import Coloring import platform_utils