From e0469b194e59ee895215a6e8c394e3ca9edc4af9 Mon Sep 17 00:00:00 2001 From: Jasper Craeghs Date: Wed, 26 Apr 2023 15:56:40 +0200 Subject: [PATCH] Don't add port to html URL --- mlx/coverity_services.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mlx/coverity_services.py b/mlx/coverity_services.py index 0b204506..706b1218 100644 --- a/mlx/coverity_services.py +++ b/mlx/coverity_services.py @@ -114,10 +114,10 @@ def get_ws_version(self): '''Get WS version for service''' return self.ws_version - def get_service_url(self, path=''): + def get_service_url(self, path='', add_port=True): '''Get Service url with given path''' url = self.transport + '://' + self.hostname - if bool(self.port): + if self.port and add_port: url += ':' + self.port if path: url += path @@ -605,9 +605,9 @@ def get_action(self, stream_defect): def get_defect_url(self, stream, cid): '''Get URL for given defect CID - http://machine1.eng.company.com:8080/query/defects.htm?stream=StreamA&cid=1234 + http://machine1.eng.company.com/query/defects.htm?stream=StreamA&cid=1234 ''' - return self.get_service_url('/query/defects.htm?stream=%s&cid=%s' % (stream, str(cid))) + return self.get_service_url('/query/defects.htm?stream=%s&cid=%s' % (stream, str(cid)), add_port=False) if __name__ == '__main__':