Code review comment for lp:~mew/charm-helpers/fetchallthethings

Revision history for this message
Liam Young (gnuoy) wrote :

It looks like ArchiveUrlFetchHandler is incorrectly reporting that is can't handle uncompressed tar files:

$ ls /tmp/testfetch/pay*
/tmp/testfetch/payload2.tar.gz /tmp/testfetch/payload.tar
$ python
Python 2.7.4 (default, Apr 19 2013, 18:32:33)
[GCC 4.7.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import charmhelpers.fetch.archiveurl
>>> fh = charmhelpers.fetch.archiveurl.ArchiveUrlFetchHandler()
>>> fh.can_handle('file:///tmp/testfetch/payload.tar')
False
>>> fh.can_handle('file:///tmp/testfetch/payload2.tar.gz')
True
>>> quit()

Also, I think ArchiveUrlFetchHandlerTest should test a file uri that doesn't contain a hostname i.e. of the format file:///path/to/tarfile

review: Needs Fixing

« Back to merge proposal