airflow/contrib/hooks/salesforce_hook.py
def get_conn(self):
        """
        Sign into Salesforce, only if we are not already signed in.
        """
        if not self.conn:
            connection = self.get_connection(self.conn_id)
            extras = connection.extra_dejson
            self.conn = Salesforce(
                username=connection.login,
                password=connection.password,
                security_token=extras['security_token'],
                instance_url=connection.host,
                sandbox=extras.get('sandbox', False)
            )
        return self.conn
def get_conn(self):
        """
        Sign into Salesforce, only if we are not already signed in.
        """
        if not self.conn:
            connection = self.get_connection(self.conn_id)
            extras = connection.extra_dejson
            self.conn = Salesforce(
                username=connection.login,
                password=connection.password,
                security_token=extras['security_token'],
                instance_url=connection.host,
                sandbox=extras.get('sandbox', False)
            )
        return self.conn
Sign into Salesforce, only if we are not already signed in.