kaxil commented on a change in pull request #6601: [AIRFLOW-6010] Remove cyclic
imports and pylint disables
URL: https://github.com/apache/airflow/pull/6601#discussion_r348501552
##########
File path: airflow/models/baseoperator.py
##########
@@ -381,7 +378,7 @@ def __init__(
self.retry_delay = retry_delay
else:
self.log.debug("Retry_delay isn't timedelta object, assuming secs")
- self.retry_delay = timedelta(seconds=retry_delay)
+ self.retry_delay = timedelta(seconds=retry_delay.seconds)
Review comment:
This will raise error the following error!:
```python
TypeError: unsupported type for timedelta seconds component:
datetime.timedelta
```
https://github.com/apache/airflow/pull/6601/files#diff-b5ec97b8301ab688b7e045426f24d485R377
checks if it is **timedelta** object or not. If it is not the code assumes
retry_delay might be a float or int.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services