Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions pfio/v2/s3.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import hashlib
import io
import os
import sys
import urllib.parse
from types import TracebackType
from typing import Optional, Type
Expand Down Expand Up @@ -428,13 +429,12 @@ def __init__(self, bucket, prefix=None,
else:
# self.endpoint is not defined in moto3 environment
self.hostname = "undefined"
print("S3 endpoint is not defined")
print("S3 endpoint is not defined", file=sys.stderr)

def _reset(self):
self._connect()

def _connect(self):
# print('boto3.client options:', kwargs)
config = Config(**self.botocore_config)
obj = boto3.client('s3', config=config, **self.kwargs)
if self.trace:
Expand All @@ -447,7 +447,7 @@ def _connect(self):
except ClientError as e:
if e.response['Error']['Code'] == '404' and self.create_bucket:
res = self.client.create_bucket(Bucket=self.bucket)
print("Bucket", self.bucket, "created:", res)
print("Bucket", self.bucket, "created:", res, file=sys.stderr)
else:
raise e

Expand Down
Loading