kaxil closed pull request #4261: [AIRFLOW-3425] Fix default scope setting in
GoogleCloudBaseHook
URL: https://github.com/apache/incubator-airflow/pull/4261
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/airflow/contrib/hooks/gcp_api_base_hook.py
b/airflow/contrib/hooks/gcp_api_base_hook.py
index 72d8e483a7..696f00da6a 100644
--- a/airflow/contrib/hooks/gcp_api_base_hook.py
+++ b/airflow/contrib/hooks/gcp_api_base_hook.py
@@ -75,7 +75,7 @@ def _get_credentials(self):
key_path = self._get_field('key_path', False)
keyfile_dict = self._get_field('keyfile_dict', False)
scope = self._get_field('scope', None)
- if scope is not None:
+ if scope:
scopes = [s.strip() for s in scope.split(',')]
else:
scopes = _DEFAULT_SCOPES
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services