1
1
Fork 0
mirror of https://github.com/pypa/pip synced 2023-12-13 21:30:23 +01:00
This commit is contained in:
Jannis Leidel 2009-08-11 22:04:56 +02:00
commit 795fac3815

11
pip.py
View file

@ -2388,10 +2388,13 @@ class HTMLPage(object):
@property
def base_url(self):
match = self._base_re.search(self.content)
if match:
return match.group(1)
return self.url
if not hasattr(self, "_base_url"):
match = self._base_re.search(self.content)
if match:
self._base_url = match.group(1)
else:
self._base_url = self.url
return self._base_url
@property
def links(self):