Skip to content

Commit

Permalink
Merge pull request #12 from wherobots/max/no-os-path
Browse files Browse the repository at this point in the history
fix: don't use os.path.join to append protocol
  • Loading branch information
mpetazzoni authored Jun 12, 2024
2 parents a5c6bda + 0ae24a5 commit 410e043
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions wherobots/db/driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,6 @@ def http_to_ws(uri: str) -> str:
return str(urllib.parse.urlunparse(parsed))


def append_protocol(uri: str, protocol: str) -> str:
"""Appends the protocol version to the URI."""
return urllib.parse.urljoin(os.path.join(uri, ""), protocol)


def connect_direct(
uri: str,
headers: dict[str, str] = None,
Expand All @@ -156,7 +151,7 @@ def connect_direct(
geometry_representation: Union[GeometryRepresentation, None] = None,
) -> Connection:
q = queue.SimpleQueue()
uri_with_protocol = append_protocol(uri, PROTOCOL_VERSION)
uri_with_protocol = f"{uri}/{PROTOCOL_VERSION}"

def create_ws_connection():
try:
Expand Down

0 comments on commit 410e043

Please sign in to comment.