PyS3Uploader 0.2.4a0__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.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: PyS3Uploader
3
- Version: 0.2.4a0
3
+ Version: 0.2.4a1
4
4
  Summary: Python module to upload objects to an S3 bucket.
5
5
  Author-email: Vignesh Rao <svignesh1793@gmail.com>
6
6
  License: MIT License
@@ -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
@@ -1,3 +1,3 @@
1
1
  from s3.uploader import Uploader # noqa: F401
2
2
 
3
- version = "0.2.4a0"
3
+ version = "0.2.4a1"
s3/uploader.py CHANGED
@@ -184,13 +184,13 @@ 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
@@ -198,7 +198,7 @@ class Uploader:
198
198
  "S3 object %s exists, but size mismatch. Local: [%d], S3: [%d]", objectpath, file_size, object_size
199
199
  )
200
200
  else:
201
- self.logger.debug("S3 object '%s' doesn't exist, uploading..", objectpath)
201
+ self.logger.debug("S3 object '%s' of size [%d bytes] doesn't exist, uploading..", objectpath, file_size)
202
202
  return True
203
203
 
204
204
  def _uploader(self, filepath: str, objectpath: str) -> None:
@@ -1,11 +0,0 @@
1
- s3/__init__.py,sha256=qPNHkWhXCMoofZe0kidyKkQ8YX3Ke0U35ViBo-oEWp0,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=VZOajOlWLWU-E34qS40YH8VUH_RCoiVvIOUP3kSzyMA,13868
6
- s3/utils.py,sha256=NbF28CYviK_St5qd1EOumMVyus9BvQON7clUFeR_SEQ,4473
7
- pys3uploader-0.2.4a0.dist-info/LICENSE,sha256=8k-hEraOzyum0GvmmK65YxNRTFXK7eIFHJ0OshJXeTk,1068
8
- pys3uploader-0.2.4a0.dist-info/METADATA,sha256=LCV-hgBLudyY3q9dq5E2sg63OnapaoEYv2ggUqDsc7I,7797
9
- pys3uploader-0.2.4a0.dist-info/WHEEL,sha256=beeZ86-EfXScwlR_HKu4SllMC9wUEj_8Z_4FJ3egI2w,91
10
- pys3uploader-0.2.4a0.dist-info/top_level.txt,sha256=iQp4y1P58Q633gj8M08kHE4mqqT0hixuDWcniDk_RJ4,3
11
- pys3uploader-0.2.4a0.dist-info/RECORD,,