This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch v1-10-test
in repository https://gitbox.apache.org/repos/asf/airflow.git

commit ec3f4dc205e620a4e7bc563549624fdb9f59bf80
Author: Jarek Potiuk <jarek.pot...@polidea.com>
AuthorDate: Wed Jul 1 18:07:12 2020 +0200

    Removes importlib usage - it's not needed (fails on Airflow 1.10) (#9613)
    
    
    (cherry picked from commit a3a52c78b274483f2035ad975fc218abd8ffdf8a)
---
 chart/templates/_helpers.yaml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/chart/templates/_helpers.yaml b/chart/templates/_helpers.yaml
index 66d1850..ac121a4 100644
--- a/chart/templates/_helpers.yaml
+++ b/chart/templates/_helpers.yaml
@@ -205,7 +205,7 @@ log_connections = {{ .Values.pgbouncer.logConnections }}
   - python
   - -c
   - |
-        import importlib
+        import airflow
         import os
         import time
 
@@ -215,7 +215,7 @@ log_connections = {{ .Values.pgbouncer.logConnections }}
 
         from airflow import settings
 
-        package_dir = 
os.path.dirname(importlib.util.find_spec('airflow').origin)
+        package_dir = os.path.abspath(os.path.dirname(airflow.__file__))
         directory = os.path.join(package_dir, 'migrations')
         config = Config(os.path.join(package_dir, 'alembic.ini'))
         config.set_main_option('script_location', directory)

Reply via email to