Skip to content

Commit

Permalink
Merge pull request #71 from melexis/remove-port
Browse files Browse the repository at this point in the history
Don't add port to URLs in HTML output
  • Loading branch information
Letme authored Apr 27, 2023
2 parents 555bfa8 + e0469b1 commit 11e4651
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions mlx/coverity_services.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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__':
Expand Down

0 comments on commit 11e4651

Please sign in to comment.