Skip to content
This repository has been archived by the owner on Nov 17, 2022. It is now read-only.

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Ilija Vukotic committed Nov 9, 2022
1 parent 4211cf3 commit 8999905
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
15 changes: 4 additions & 11 deletions servicex/transformer/object_store_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import os
import logging
from minio.error import MinioException, S3Error


class ObjectStoreManager:
Expand All @@ -52,13 +51,7 @@ def __init__(self, url=None, username=None, password=None, use_https=False):
secure=secure_connection)

def upload_file(self, bucket, object_name, path):
try:
result = self.minio_client.fput_object(bucket_name=bucket,
object_name=object_name,
file_path=path)
self.logger.debug(
"created object", result.object_name)
except MinioException:
self.logger.error("Minio error", exc_info=True)
except S3Error:
self.logger.error("S3Error", exc_info=True)
result = self.minio_client.fput_object(bucket_name=bucket,
object_name=object_name,
file_path=path)
self.logger.debug("created object", result.object_name)
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
'pyarrow == 3.0.0',
'numpy == 1.23.3',
'pika==1.1.0',
'minio==7.1.12',
'minio==5.0.10',
'retry == 0.9.2'
],

Expand Down

0 comments on commit 8999905

Please sign in to comment.