shlomi-viz commented on issue #18111:
URL: https://github.com/apache/airflow/issues/18111#issuecomment-916009650
I want it to be able to upload a file in any case (file already exists or
not), I know about the `replace` flag, but I also want to cover the case when
the file doesn't exists.
My suggestion is to catch the error and allow the upload, without adding
another error. It will be something like, updating:
```python
except ClientError as e:
if e.response["ResponseMetadata"]["HTTPStatusCode"] == 404:
return False
else:
raise e
```
to:
```python
except ClientError as e:
if e.response["ResponseMetadata"]["HTTPStatusCode"] IN (404,
403):
return False
else:
raise e
```
shortest PR ever 😆 I will try to submit one next week.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]