# HG changeset patch # User RhodeCode Admin # Date 2024-01-10 08:39:17 # Node ID e241ac2ab29f7fd8986ea4677050989b9149c094 # Parent 930eac40fadd7eeabd13e4111b169c02f30a766b chore(http-client): small refactor and use fstrings diff --git a/rhodecode/lib/vcs/client_http.py b/rhodecode/lib/vcs/client_http.py --- a/rhodecode/lib/vcs/client_http.py +++ b/rhodecode/lib/vcs/client_http.py @@ -148,7 +148,7 @@ def _streaming_remote_call(url, payload, class ServiceConnection(object): def __init__(self, server_and_port, backend_endpoint, session_factory): - self.url = urllib.parse.urljoin('http://%s' % server_and_port, backend_endpoint) + self.url = urllib.parse.urljoin(f'http://{server_and_port}', backend_endpoint) self._session_factory = session_factory def __getattr__(self, name): @@ -170,8 +170,8 @@ class ServiceConnection(object): class RemoteVCSMaker(object): def __init__(self, server_and_port, backend_endpoint, backend_type, session_factory): - self.url = urllib.parse.urljoin('http://%s' % server_and_port, backend_endpoint) - self.stream_url = urllib.parse.urljoin('http://%s' % server_and_port, backend_endpoint+'/stream') + self.url = urllib.parse.urljoin(f'http://{server_and_port}', backend_endpoint) + self.stream_url = urllib.parse.urljoin(f'http://{server_and_port}', backend_endpoint+'/stream') self._session_factory = session_factory self.backend_type = backend_type