Uploaded image for project: 'Apache Airflow'
  1. Apache Airflow
  2. AIRFLOW-5489

bash_senor: Remove unneeded assignment of variable

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.10.6
    • Fix Version/s: 1.10.6
    • Component/s: operators
    • Labels:

      Description

      Note: This ticket's being created to facilitate a new contributor's workshop for Airflow. After the workshop has completed, I'll mark these all available for anyone that might like to take them on.

      The `line` variable is assigned to `''` but then immediately reassigned in the loop.  This first assignment should be deleted.

      airflow/contrib/sensors/bash_sensor.py:83

      line = ''
      for line in iter(sp.stdout.readline, b''):
          line = line.decode(self.output_encoding).strip()
          self.log.info(line)
      sp.wait()
      self.log.info("Command exited with return code %s", sp.returncode) 

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                jghoman Jakob Homan
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: