Skip to content

Commit edf7acd

Browse files
tiranuxferruzzi
authored andcommitted
Fix wrong OR condition when evaluating beam version < 2.39.0 (apache#33308)
1 parent e3605d5 commit edf7acd

File tree

1 file changed

+2
-2
lines changed
  • airflow/providers/apache/beam/hooks

1 file changed

+2
-2
lines changed

airflow/providers/apache/beam/hooks/beam.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ def start_python_pipeline(
273273
self.log.info("Beam version: %s", beam_version)
274274
impersonate_service_account = variables.get("impersonate_service_account")
275275
if impersonate_service_account:
276-
if Version(beam_version) < Version("2.39.0") or True:
276+
if Version(beam_version) < Version("2.39.0"):
277277
raise AirflowException(
278278
"The impersonateServiceAccount option requires Apache Beam 2.39.0 or newer."
279279
)
@@ -490,7 +490,7 @@ async def start_python_pipeline_async(
490490
self.log.info("Beam version: %s", beam_version)
491491
impersonate_service_account = variables.get("impersonate_service_account")
492492
if impersonate_service_account:
493-
if Version(beam_version) < Version("2.39.0") or True:
493+
if Version(beam_version) < Version("2.39.0"):
494494
raise AirflowException(
495495
"The impersonateServiceAccount option requires Apache Beam 2.39.0 or newer."
496496
)

0 commit comments

Comments
 (0)