diff options
Diffstat (limited to 'subcmds/sync.py')
| -rw-r--r-- | subcmds/sync.py | 25 |
1 files changed, 5 insertions, 20 deletions
diff --git a/subcmds/sync.py b/subcmds/sync.py index 1e1f2fc1..3482946d 100644 --- a/subcmds/sync.py +++ b/subcmds/sync.py | |||
| @@ -12,6 +12,7 @@ | |||
| 12 | # See the License for the specific language governing permissions and | 12 | # See the License for the specific language governing permissions and |
| 13 | # limitations under the License. | 13 | # limitations under the License. |
| 14 | 14 | ||
| 15 | import http.cookiejar as cookielib | ||
| 15 | import json | 16 | import json |
| 16 | import netrc | 17 | import netrc |
| 17 | from optparse import SUPPRESS_HELP | 18 | from optparse import SUPPRESS_HELP |
| @@ -22,26 +23,10 @@ import subprocess | |||
| 22 | import sys | 23 | import sys |
| 23 | import tempfile | 24 | import tempfile |
| 24 | import time | 25 | import time |
| 25 | 26 | import urllib.error | |
| 26 | from pyversion import is_python3 | 27 | import urllib.parse |
| 27 | if is_python3(): | 28 | import urllib.request |
| 28 | import http.cookiejar as cookielib | 29 | import xmlrpc.client |
| 29 | import urllib.error | ||
| 30 | import urllib.parse | ||
| 31 | import urllib.request | ||
| 32 | import xmlrpc.client | ||
| 33 | else: | ||
| 34 | import cookielib | ||
| 35 | import imp | ||
| 36 | import urllib2 | ||
| 37 | import urlparse | ||
| 38 | import xmlrpclib | ||
| 39 | urllib = imp.new_module('urllib') | ||
| 40 | urllib.error = urllib2 | ||
| 41 | urllib.parse = urlparse | ||
| 42 | urllib.request = urllib2 | ||
| 43 | xmlrpc = imp.new_module('xmlrpc') | ||
| 44 | xmlrpc.client = xmlrpclib | ||
| 45 | 30 | ||
| 46 | try: | 31 | try: |
| 47 | import threading as _threading | 32 | import threading as _threading |
