Pārlūkot izejas kodu

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>
Rashed Abdel-Tawab 6 gadi atpakaļ
vecāks
revīzija
2058c63641
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      main.py

+ 1 - 1
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