diff options
Diffstat (limited to 'import/pip.to_lorry')
-rwxr-xr-x | import/pip.to_lorry | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/import/pip.to_lorry b/import/pip.to_lorry index 7dd1678..214f840 100755 --- a/import/pip.to_lorry +++ b/import/pip.to_lorry @@ -67,11 +67,9 @@ def get_compression(url): 'tar.bz2': bzip, 'tbz2': bzip, 'tar.lzma': lzma, 'tar.xz': lzma, 'tlz': lzma, 'txz': lzma} - ext = '.'.join(url.split('.')[-2:]) - if ext in m: return m[ext] - - ext = url.split('.')[-1:] - if ext in m: return m[ext] + for x in [1, 2]: + ext = '.'.join(url.split('.')[-x:]) + if ext in m: return m[ext] return None |