Convert target path from Path to str & PurePath
The target path is just read as string from the CLI now, to allow more complex targets (such as URLs) that don't directly map to a path. The Packer subclass now handles the conversion from that string to a `pathlib.PurePath`, and specific subclasses & transfer classes can convert those to a `pathlib.Path` to perform actual filesystem operations when necessary.
This commit is contained in:
@@ -120,7 +120,7 @@ class S3Transferrer(transfer.FileTransferer):
|
||||
if files_skipped:
|
||||
log.info('Skipped %d files', files_skipped)
|
||||
|
||||
def upload_file(self, src: pathlib.Path, dst: pathlib.Path) -> bool:
|
||||
def upload_file(self, src: pathlib.Path, dst: pathlib.PurePath) -> bool:
|
||||
"""Upload a file to an S3 bucket.
|
||||
|
||||
The first part of 'dst' is used as the bucket name, the remained as the
|
||||
|
||||
Reference in New Issue
Block a user