diff --git a/airflow/providers/apache/beam/hooks/beam.py b/airflow/providers/apache/beam/hooks/beam.py index d92ade2050c9..ee43d86d73f4 100644 --- a/airflow/providers/apache/beam/hooks/beam.py +++ b/airflow/providers/apache/beam/hooks/beam.py @@ -273,7 +273,7 @@ def start_python_pipeline( self.log.info("Beam version: %s", beam_version) impersonate_service_account = variables.get("impersonate_service_account") if impersonate_service_account: - if Version(beam_version) < Version("2.39.0") or True: + if Version(beam_version) < Version("2.39.0"): raise AirflowException( "The impersonateServiceAccount option requires Apache Beam 2.39.0 or newer." ) @@ -488,7 +488,7 @@ async def start_python_pipeline_async( self.log.info("Beam version: %s", beam_version) impersonate_service_account = variables.get("impersonate_service_account") if impersonate_service_account: - if Version(beam_version) < Version("2.39.0") or True: + if Version(beam_version) < Version("2.39.0"): raise AirflowException( "The impersonateServiceAccount option requires Apache Beam 2.39.0 or newer." )