(compression)
| 701 | } |
| 702 | |
| 703 | def _check_compression(compression): |
| 704 | if compression == ZIP_STORED: |
| 705 | pass |
| 706 | elif compression == ZIP_DEFLATED: |
| 707 | if not zlib: |
| 708 | raise RuntimeError( |
| 709 | "Compression requires the (missing) zlib module") |
| 710 | elif compression == ZIP_BZIP2: |
| 711 | if not bz2: |
| 712 | raise RuntimeError( |
| 713 | "Compression requires the (missing) bz2 module") |
| 714 | elif compression == ZIP_LZMA: |
| 715 | if not lzma: |
| 716 | raise RuntimeError( |
| 717 | "Compression requires the (missing) lzma module") |
| 718 | else: |
| 719 | raise NotImplementedError("That compression method is not supported") |
| 720 | |
| 721 | |
| 722 | def _get_compressor(compress_type, compresslevel=None): |
no outgoing calls
no test coverage detected