Allow packing to ZIP files

This commit is contained in:
Sybren A. Stüvel
2018-03-22 10:06:48 +01:00
parent e53470d898
commit 8d1bd89583
6 changed files with 118 additions and 13 deletions
+1 -10
View File
@@ -18,11 +18,10 @@
#
# (c) 2018, Blender Foundation - Sybren A. Stüvel
"""Amazon S3-compatible uploader."""
import typing
import hashlib
import logging
import pathlib
import typing
import urllib.parse
from . import Packer, transfer
@@ -157,14 +156,6 @@ class S3Transferrer(transfer.FileTransferer):
raise self.AbortUpload('interrupting ongoing upload')
super().report_transferred(bytes_transferred)
def delete_file(self, path: pathlib.Path):
"""Deletes a file, only logging a warning if deletion fails."""
log.debug('Deleting %s, file has been uploaded', path)
try:
path.unlink()
except IOError as ex:
log.warning('Unable to delete %s: %s', path, ex)
def get_metadata(self, bucket: str, key: str) -> typing.Tuple[str, int]:
"""Get MD5 sum and size on S3.