diff --git a/pfio/v2/s3.py b/pfio/v2/s3.py index c078169..429f717 100644 --- a/pfio/v2/s3.py +++ b/pfio/v2/s3.py @@ -428,7 +428,8 @@ def __init__(self, bucket, prefix=None, else: # self.endpoint is not defined in moto3 environment self.hostname = "undefined" - print("S3 endpoint is not defined") + if self.verbose: + print("S3 endpoint is not defined") def _reset(self): self._connect() @@ -447,7 +448,8 @@ 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) + if self.verbose: + print("Bucket", self.bucket, "created:", res) else: raise e