ohad created AIRFLOW-6402: ----------------------------- Summary: SSH operator failed - startswith on null value Key: AIRFLOW-6402 URL: https://issues.apache.org/jira/browse/AIRFLOW-6402 Project: Apache Airflow Issue Type: Bug Components: operators Affects Versions: 1.10.7 Reporter: ohad
Hi I found a bug in the constructor off the new airflow (1.10.7). It's affects me when I am implementing my own operator (I'ts extends from SshOperator) The default value for the "self.command" variable is None, while this line of code cant run because of the default value: {code:java} self.get_pty = self.command.startswith('sudo') or get_pty {code} My solution right now (In my plugin) is to send value of empty string to the constructor: {code:java} super().__init__(command='', *args, **kwargs){code} instead of: {code:java} super().__init__(*args, **kwargs){code} The problematic file is (line 83): {code:java} /v1-10-stable/airflow/contrib/operators/ssh_operator.py {code} Thanks -- This message was sent by Atlassian Jira (v8.3.4#803005)