Skip to content

Commit

Permalink
Allow back script_location in Glue to be None
Browse files Browse the repository at this point in the history
Fix error introduced in apache#20935 where script location in Glue
Job could be None.
  • Loading branch information
potiuk committed Apr 29, 2022
1 parent f197030 commit 82ad5d5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion airflow/providers/amazon/aws/operators/glue.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,9 @@ def execute(self, context: 'Context'):
:return: the id of the current glue job.
"""
if not self.script_location.startswith(self.s3_protocol):
if self.script_location is None:
s3_script_location = None
elif self.script_location.startswith(self.s3_protocol):
s3_hook = S3Hook(aws_conn_id=self.aws_conn_id)
script_name = os.path.basename(self.script_location)
s3_hook.load_file(
Expand Down

0 comments on commit 82ad5d5

Please sign in to comment.