You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2019/02/27 15:17:48 UTC

[GitHub] mik-laj commented on a change in pull request #4794: [AIRFLOW-3189] - fix DbAPI get_uri returns invalid uri if schema is None

mik-laj commented on a change in pull request #4794: [AIRFLOW-3189] - fix DbAPI get_uri returns invalid uri if schema is None
URL: https://github.com/apache/airflow/pull/4794#discussion_r260796384
 
 

 ##########
 File path: airflow/hooks/dbapi_hook.py
 ##########
 @@ -70,8 +70,11 @@ def get_uri(self):
         host = conn.host
         if conn.port is not None:
             host += ':{port}'.format(port=conn.port)
-        return '{conn.conn_type}://{login}{host}/{conn.schema}'.format(
+        uri = '{conn.conn_type}://{login}{host}'.format(
 
 Review comment:
   Have you thought to use urrlibunparse here?
   https://docs.python.org/3/library/urllib.parse.html 
   This could make this code simpler and easier to read.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services