mirror of
https://github.com/matrix-org/synapse-s3-storage-provider.git
synced 2024-10-23 07:29:40 +00:00
Resolve linting errors
This commit is contained in:
parent
1e2cec3e56
commit
d08c2dcf22
2 changed files with 3 additions and 9 deletions
|
@ -213,10 +213,7 @@ def s3_download_task(s3_client, bucket, key, eargs, deferred, parent_logcontext)
|
|||
resp = s3_client.get_object(Bucket=bucket, Key=key)
|
||||
|
||||
except botocore.exceptions.ClientError as e:
|
||||
if e.response["Error"]["Code"] in (
|
||||
"404",
|
||||
"NoSuchKey",
|
||||
):
|
||||
if e.response["Error"]["Code"] in ("404","NoSuchKey",):
|
||||
logger.info("Media %s not found in S3", key)
|
||||
reactor.callFromThread(deferred.callback, None)
|
||||
return
|
||||
|
|
|
@ -338,10 +338,7 @@ def run_upload(s3, bucket, sqlite_conn, base_path, eargs, should_delete):
|
|||
if not check_file_in_s3(s3, bucket, rel_file_path, eargs):
|
||||
try:
|
||||
s3.upload_file(
|
||||
local_path,
|
||||
bucket,
|
||||
rel_file_path,
|
||||
ExtraArgs=eargs,
|
||||
local_path, bucket, rel_file_path, ExtraArgs=eargs,
|
||||
)
|
||||
except Exception as e:
|
||||
print("Failed to upload file %s: %s", local_path, e)
|
||||
|
@ -572,7 +569,7 @@ def main():
|
|||
sqlite_conn,
|
||||
args.base_path,
|
||||
eargs,
|
||||
should_delete=args.delete
|
||||
should_delete=args.delete,
|
||||
)
|
||||
return
|
||||
|
||||
|
|
Loading…
Reference in a new issue