Skip to content

Commit 33b4416

Browse files
jt55401sebastian-nagel
authored andcommitted
fix: don't log 404 errors when checking for existence
1 parent 6b3c0fc commit 33b4416

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

sparkcc.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -804,6 +804,8 @@ def check_for_output_file(self, uri, base_uri=None):
804804
self.get_s3_client().head_object(Bucket=bucketname, Key=path)
805805
return True
806806
except botocore.client.ClientError as exception:
807+
if exception.response['Error']['Code'] == '404':
808+
return False
807809
self.get_logger().error(
808810
'Failed to check if file exists on S3 {}: {}'.format(uri, exception))
809811
return False

0 commit comments

Comments
 (0)