PyS3Uploader 0.2.3__py3-none-any.whl → 0.2.4a1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of PyS3Uploader might be problematic. Click here for more details.
- {pys3uploader-0.2.3.dist-info → pys3uploader-0.2.4a1.dist-info}/METADATA +1 -1
- pys3uploader-0.2.4a1.dist-info/RECORD +11 -0
- s3/__init__.py +1 -1
- s3/uploader.py +7 -5
- pys3uploader-0.2.3.dist-info/RECORD +0 -11
- {pys3uploader-0.2.3.dist-info → pys3uploader-0.2.4a1.dist-info}/LICENSE +0 -0
- {pys3uploader-0.2.3.dist-info → pys3uploader-0.2.4a1.dist-info}/WHEEL +0 -0
- {pys3uploader-0.2.3.dist-info → pys3uploader-0.2.4a1.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
s3/__init__.py,sha256=wolI_hcB1EXMCV8-uFu5Gri6ZEn_a3GZ9OgKSEBQUxA,68
|
|
2
|
+
s3/exceptions.py,sha256=hH3jlMOe8yjBatQK9EdndWZz4QESU74KSY_iDhQ37SY,2585
|
|
3
|
+
s3/logger.py,sha256=oH540oq8jY723jA4lDWlgfFPLbNgGXTkDwFpB7TLO_o,1196
|
|
4
|
+
s3/tree.py,sha256=DiQ2ekMMaj2m_P3-iKkEqSuJCJZ_UZxcAwHtAoPVa5c,1824
|
|
5
|
+
s3/uploader.py,sha256=cXH4lEyLeboKvG7TAtfyYy85BZ5y-rlROHfGqvlv0tc,13880
|
|
6
|
+
s3/utils.py,sha256=NbF28CYviK_St5qd1EOumMVyus9BvQON7clUFeR_SEQ,4473
|
|
7
|
+
pys3uploader-0.2.4a1.dist-info/LICENSE,sha256=8k-hEraOzyum0GvmmK65YxNRTFXK7eIFHJ0OshJXeTk,1068
|
|
8
|
+
pys3uploader-0.2.4a1.dist-info/METADATA,sha256=p038fM45k9uX7A2QZkpKSypumgJsYNU13crP1Tn56qQ,7797
|
|
9
|
+
pys3uploader-0.2.4a1.dist-info/WHEEL,sha256=beeZ86-EfXScwlR_HKu4SllMC9wUEj_8Z_4FJ3egI2w,91
|
|
10
|
+
pys3uploader-0.2.4a1.dist-info/top_level.txt,sha256=iQp4y1P58Q633gj8M08kHE4mqqT0hixuDWcniDk_RJ4,3
|
|
11
|
+
pys3uploader-0.2.4a1.dist-info/RECORD,,
|
s3/__init__.py
CHANGED
s3/uploader.py
CHANGED
|
@@ -184,19 +184,21 @@ class Uploader:
|
|
|
184
184
|
"""
|
|
185
185
|
if self.overwrite:
|
|
186
186
|
return True
|
|
187
|
+
try:
|
|
188
|
+
file_size = os.path.getsize(filepath)
|
|
189
|
+
except (OSError, PermissionError) as error:
|
|
190
|
+
self.logger.error(error)
|
|
191
|
+
file_size = 0
|
|
187
192
|
# Indicates that the object path already exists in S3
|
|
188
193
|
if object_size := self.object_size_map.get(objectpath):
|
|
189
|
-
try:
|
|
190
|
-
file_size = os.path.getsize(filepath)
|
|
191
|
-
except (OSError, PermissionError) as error:
|
|
192
|
-
self.logger.error(error)
|
|
193
|
-
return True
|
|
194
194
|
if object_size == file_size:
|
|
195
195
|
self.logger.info("S3 object %s exists, and size [%d] matches, skipping..", objectpath, object_size)
|
|
196
196
|
return False
|
|
197
197
|
self.logger.info(
|
|
198
198
|
"S3 object %s exists, but size mismatch. Local: [%d], S3: [%d]", objectpath, file_size, object_size
|
|
199
199
|
)
|
|
200
|
+
else:
|
|
201
|
+
self.logger.debug("S3 object '%s' of size [%d bytes] doesn't exist, uploading..", objectpath, file_size)
|
|
200
202
|
return True
|
|
201
203
|
|
|
202
204
|
def _uploader(self, filepath: str, objectpath: str) -> None:
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
s3/__init__.py,sha256=aZ2woJ8TD2tgqXi0ElG-wWwJWoQLIdqTdm50FLaxL8w,66
|
|
2
|
-
s3/exceptions.py,sha256=hH3jlMOe8yjBatQK9EdndWZz4QESU74KSY_iDhQ37SY,2585
|
|
3
|
-
s3/logger.py,sha256=oH540oq8jY723jA4lDWlgfFPLbNgGXTkDwFpB7TLO_o,1196
|
|
4
|
-
s3/tree.py,sha256=DiQ2ekMMaj2m_P3-iKkEqSuJCJZ_UZxcAwHtAoPVa5c,1824
|
|
5
|
-
s3/uploader.py,sha256=KxrWbIInXxXQszP_uJLf_dBI5rUNjNnhco3gr9Vdrto,13767
|
|
6
|
-
s3/utils.py,sha256=NbF28CYviK_St5qd1EOumMVyus9BvQON7clUFeR_SEQ,4473
|
|
7
|
-
pys3uploader-0.2.3.dist-info/LICENSE,sha256=8k-hEraOzyum0GvmmK65YxNRTFXK7eIFHJ0OshJXeTk,1068
|
|
8
|
-
pys3uploader-0.2.3.dist-info/METADATA,sha256=ae2lA8b7dsGWZSMfB8w4joDiAlaE6Wk1f3p1Fxywkc4,7795
|
|
9
|
-
pys3uploader-0.2.3.dist-info/WHEEL,sha256=beeZ86-EfXScwlR_HKu4SllMC9wUEj_8Z_4FJ3egI2w,91
|
|
10
|
-
pys3uploader-0.2.3.dist-info/top_level.txt,sha256=iQp4y1P58Q633gj8M08kHE4mqqT0hixuDWcniDk_RJ4,3
|
|
11
|
-
pys3uploader-0.2.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|