You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2018/05/16 21:38:02 UTC

[GitHub] hughhhh closed pull request #5020: Make port number optional in superset for druid

hughhhh closed pull request #5020: Make port number optional in superset for druid
URL: https://github.com/apache/incubator-superset/pull/5020
 
 
   

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/superset/connectors/druid/models.py b/superset/connectors/druid/models.py
index 3cece6ec34..85afc852b2 100644
--- a/superset/connectors/druid/models.py
+++ b/superset/connectors/druid/models.py
@@ -116,7 +116,9 @@ def data(self):
     def get_base_url(host, port):
         if not re.match('http(s)?://', host):
             host = 'http://' + host
-        return '{0}:{1}'.format(host, port)
+
+        url = '{0}:{1}'.format(host, port) if port else host
+        return url
 
     def get_base_coordinator_url(self):
         base_url = self.get_base_url(


 

----------------------------------------------------------------
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

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org