PEP 8 compliance.
This commit is contained in:
parent
dace0de99b
commit
66fd1bfe11
1 changed files with 18 additions and 12 deletions
30
dcc/put.py
30
dcc/put.py
|
@ -2,16 +2,22 @@ import boto3
|
|||
import dcc.config
|
||||
import dcc.doom_base
|
||||
|
||||
class Put(dcc.doom_base.WadMap):
|
||||
def get_parser(self, prog_name):
|
||||
parser = super().get_parser(prog_name)
|
||||
return parser
|
||||
|
||||
# TODO: accept configuration for bucket name
|
||||
def take_action(self, parsed_args):
|
||||
s3_client = boto3.client('s3')
|
||||
demo = self.demo_in_path()
|
||||
bucket = self.target_bucket()
|
||||
print("Uploading {} to bucket {}.".format(demo, bucket))
|
||||
s3_client.upload_file(demo, 'yrriban', bucket,
|
||||
ExtraArgs={'ContentType': 'binary/octet-stream', 'ACL': 'public-read'})
|
||||
class Put(dcc.doom_base.WadMap):
|
||||
def get_parser(self, prog_name):
|
||||
parser = super().get_parser(prog_name)
|
||||
return parser
|
||||
|
||||
# TODO: accept configuration for bucket name
|
||||
def take_action(self, parsed_args):
|
||||
s3_client = boto3.client('s3')
|
||||
demo = self.demo_in_path()
|
||||
bucket = self.target_bucket()
|
||||
print("Uploading {} to bucket {}.".format(demo, bucket))
|
||||
s3_client.upload_file(
|
||||
demo, 'yrriban', bucket,
|
||||
ExtraArgs={
|
||||
'ContentType': 'binary/octet-stream',
|
||||
'ACL': 'public-read'
|
||||
}
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue