Skip to content

Commit

Permalink
Allow relative URLs for included databases and packages.
Browse files Browse the repository at this point in the history
  • Loading branch information
jackjansen committed Jan 7, 2005
1 parent da49e19 commit 1dd087c
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions Lib/plat-mac/pimp.py
Original file line number Diff line number Diff line change
Expand Up @@ -402,18 +402,21 @@ def appendURL(self, url, included=0):
self._maintainer = plistdata.get('Maintainer', '')
self._description = plistdata.get('Description', '').strip()
self._url = url
self._appendPackages(plistdata['Packages'])
self._appendPackages(plistdata['Packages'], url)
others = plistdata.get('Include', [])
for url in others:
self.appendURL(url, included=1)
for o in others:
o = urllib.basejoin(url, o)
self.appendURL(o, included=1)

def _appendPackages(self, packages):
def _appendPackages(self, packages, url):
"""Given a list of dictionaries containing package
descriptions create the PimpPackage objects and append them
to our internal storage."""

for p in packages:
p = dict(p)
if p.has_key('Download-URL'):
p['Download-URL'] = urllib.basejoin(url, p['Download-URL'])
flavor = p.get('Flavor')
if flavor == 'source':
pkg = PimpPackage_source(self, p)
Expand Down

0 comments on commit 1dd087c

Please sign in to comment.