Skip to content
This repository was archived by the owner on Oct 3, 2020. It is now read-only.

Fix Windows paths by using posixpath for URL building #58

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions pykube/objects.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import copy
import json
import os.path as op
import posixpath
from inspect import getmro
from typing import Optional
from typing import Type
Expand Down Expand Up @@ -96,9 +96,8 @@ def api_kwargs(self, **kwargs):
else:
subresource = kwargs.pop("subresource", None) or ""
operation = kwargs.pop("operation", "")
kw["url"] = op.normpath(
op.join(self.endpoint, self.name, subresource, operation)
)
kw["url"] = posixpath.join(self.endpoint, self.name, subresource, operation)

params = kwargs.pop("params", None)
if params is not None:
query_string = urlencode(params)
Expand Down