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>
diff --git a/main.py b/main.py
index 515cdf4..6e74d5a 100755
--- a/main.py
+++ b/main.py
@@ -23,7 +23,6 @@
 
 from __future__ import print_function
 import getpass
-import imp
 import netrc
 import optparse
 import os
@@ -34,6 +33,7 @@
 if is_python3():
   import urllib.request
 else:
+  import imp
   import urllib2
   urllib = imp.new_module('urllib')
   urllib.request = urllib2