Lines 1-4
Link Here
|
1 |
# Copyright 1998-2011 Gentoo Foundation |
1 |
# Copyright 1998-2012 Gentoo Foundation |
2 |
# Distributed under the terms of the GNU General Public License v2 |
2 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
|
3 |
|
4 |
__all__ = ["bindbapi", "binarytree"] |
4 |
__all__ = ["bindbapi", "binarytree"] |
Lines 26-31
from portage.dep import Atom, use_reduce, paren_enclose
Link Here
|
26 |
from portage.exception import AlarmSignal, InvalidPackageName, \ |
26 |
from portage.exception import AlarmSignal, InvalidPackageName, \ |
27 |
PermissionDenied, PortageException |
27 |
PermissionDenied, PortageException |
28 |
from portage.localization import _ |
28 |
from portage.localization import _ |
|
|
29 |
from portage.util import urlopen |
29 |
from portage import _movefile |
30 |
from portage import _movefile |
30 |
from portage import os |
31 |
from portage import os |
31 |
from portage import _encodings |
32 |
from portage import _encodings |
Lines 45-54
import warnings
Link Here
|
45 |
from itertools import chain |
46 |
from itertools import chain |
46 |
try: |
47 |
try: |
47 |
from urllib.parse import urlparse |
48 |
from urllib.parse import urlparse |
48 |
from urllib.request import urlopen as urllib_request_urlopen |
|
|
49 |
except ImportError: |
49 |
except ImportError: |
50 |
from urlparse import urlparse |
50 |
from urlparse import urlparse |
51 |
from urllib import urlopen as urllib_request_urlopen |
|
|
52 |
|
51 |
|
53 |
if sys.hexversion >= 0x3000000: |
52 |
if sys.hexversion >= 0x3000000: |
54 |
basestring = str |
53 |
basestring = str |
Lines 843-849
class binarytree(object):
Link Here
|
843 |
# slash, so join manually... |
842 |
# slash, so join manually... |
844 |
url = base_url.rstrip("/") + "/Packages" |
843 |
url = base_url.rstrip("/") + "/Packages" |
845 |
try: |
844 |
try: |
846 |
f = urllib_request_urlopen(url) |
845 |
f = urlopen(url) |
847 |
except IOError: |
846 |
except IOError: |
848 |
path = parsed_url.path.rstrip("/") + "/Packages" |
847 |
path = parsed_url.path.rstrip("/") + "/Packages" |
849 |
|
848 |
|