mirror of
https://gerrit.googlesource.com/git-repo
synced 2024-12-21 07:16:21 +00:00
Only import imp on py2
imp is deprecatedon py3. It's also not used with py3, so just move it to the py2 import block Test: run `repo` command and verify warning is no longer present Test: verify `repo sync` and `repo upload` function as expected Change-Id: I9d59403d7819c4a478c9f54cbef114f8a96486a5 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/239713 Tested-by: Rashed Abdel-Tawab <rashedabdeltawab@gmail.com> Reviewed-by: Mike Frysinger <vapier@google.com>
This commit is contained in:
parent
c8290ad49e
commit
2058c63641
2
main.py
2
main.py
@ -23,7 +23,6 @@ which takes care of execing this entry point.
|
||||
|
||||
from __future__ import print_function
|
||||
import getpass
|
||||
import imp
|
||||
import netrc
|
||||
import optparse
|
||||
import os
|
||||
@ -34,6 +33,7 @@ from pyversion import is_python3
|
||||
if is_python3():
|
||||
import urllib.request
|
||||
else:
|
||||
import imp
|
||||
import urllib2
|
||||
urllib = imp.new_module('urllib')
|
||||
urllib.request = urllib2
|
||||
|
Loading…
Reference in New Issue
Block a user