diff options
author | Mike Frysinger <vapier@google.com> | 2019-06-13 02:24:21 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@google.com> | 2021-01-06 18:53:58 +0000 |
commit | acf63b28928b33d1335dfed1af7e2d8fc6bb5fc4 (patch) | |
tree | e7b65524857d00cec6b36c989659afd1132d15ce /hooks.py | |
parent | 784ccfc040dc8efa1a64d3c7d4070b66beb15d08 (diff) | |
download | git-repo-acf63b28928b33d1335dfed1af7e2d8fc6bb5fc4.tar.gz |
drop pyversion & is_python3 checking
We're committed to Python 3 at this point, so purge all the
is_python3 related dynamic checks.
Bug: https://crbug.com/gerrit/10418
Change-Id: I4c8b405d6de359b8b83223c9f4b9c8ffa18ea1a2
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/292383
Reviewed-by: Chris Mcdonald <cjmcdonald@google.com>
Tested-by: Mike Frysinger <vapier@google.com>
Diffstat (limited to 'hooks.py')
-rw-r--r-- | hooks.py | 11 |
1 files changed, 1 insertions, 10 deletions
@@ -19,20 +19,11 @@ import re | |||
19 | import subprocess | 19 | import subprocess |
20 | import sys | 20 | import sys |
21 | import traceback | 21 | import traceback |
22 | import urllib.parse | ||
22 | 23 | ||
23 | from error import HookError | 24 | from error import HookError |
24 | from git_refs import HEAD | 25 | from git_refs import HEAD |
25 | 26 | ||
26 | from pyversion import is_python3 | ||
27 | if is_python3(): | ||
28 | import urllib.parse | ||
29 | else: | ||
30 | import imp | ||
31 | import urlparse | ||
32 | urllib = imp.new_module('urllib') | ||
33 | urllib.parse = urlparse | ||
34 | input = raw_input # noqa: F821 | ||
35 | |||
36 | 27 | ||
37 | class RepoHook(object): | 28 | class RepoHook(object): |
38 | """A RepoHook contains information about a script to run as a hook. | 29 | """A RepoHook contains information about a script to run as a hook. |