diff options
| author | Nick Pope <nick.pope@flightdataservices.com> | 2019-02-06 21:37:25 +0000 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2019-07-31 09:46:17 +0200 |
| commit | 69a30f620eb46246c0b39cd40a0f7df57f2af8d0 (patch) | |
| tree | 84a3d0c9deaff7d8c9e4c50780689beb1e5c500b /django/utils/archive.py | |
| parent | e3fc9af4abd65262f2d3bdced96b687b65be618a (diff) | |
Refs #30160 -- Simplified archive extension map and added other aliases.
Diffstat (limited to 'django/utils/archive.py')
| -rw-r--r-- | django/utils/archive.py | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/django/utils/archive.py b/django/utils/archive.py index 15326eb18c..c94ca4950b 100644 --- a/django/utils/archive.py +++ b/django/utils/archive.py @@ -216,11 +216,9 @@ class ZipArchive(BaseArchive): self._archive.close() -extension_map = { - '.tar': TarArchive, - '.tar.bz2': TarArchive, - '.tar.gz': TarArchive, - '.tgz': TarArchive, - '.tz2': TarArchive, - '.zip': ZipArchive, -} +extension_map = dict.fromkeys(( + '.tar', + '.tar.bz2', '.tbz2', '.tbz', '.tz2', + '.tar.gz', '.tgz', '.taz', +), TarArchive) +extension_map['.zip'] = ZipArchive |
