uranusjr commented on code in PR #23160:
URL: https://github.com/apache/airflow/pull/23160#discussion_r873048997
##########
airflow/providers/docker/operators/docker.py:
##########
@@ -187,7 +187,14 @@ def __init__(
) -> None:
super().__init__(**kwargs)
self.api_version = api_version
- self.auto_remove = auto_remove
+ if str(auto_remove) == "False":
+ self.auto_remove = "never"
+ elif str(auto_remove) == "True":
+ self.auto_remove = "success"
+ elif str(auto_remove) in ("never", "success", "force"):
+ self.auto_remove = auto_remove
+ else:
+ raise AirflowException("unsupport auto_remove option, use 'never',
'success', 'force' instead")
Review Comment:
```suggestion
raise ValueError("unsupported auto_remove option, use 'never',
'success', or 'force' instead")
```
--
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]