Code review comment for lp:~nuclearbob/utah/url-config

Revision history for this message
Javier Collado (javier.collado) wrote :

Due to the way `url_argument` works, for URLs other than `lp` ones, you can get
the same URL back

>>> url_argument('http://www.ubuntu.com')
'http://www.ubuntu.com'

If you just want to add support for `lp` URLs, then I'd advice
to add simple check like:
elif abspath.startswith('lp:')

to avoid problems with other URLs.

If you want to add support for `http` URLs, then a wrapper can be added to the
`utah.url` module to use `urlretrieve` when the value returned from
`urlargument` isn't a path to a local file.

« Back to merge proposal