From 7b74c49066432a166fe5f9bce9fd11f8e58a8147 Mon Sep 17 00:00:00 2001 From: Dimitar Ivanov Date: Wed, 26 Jul 2017 10:46:45 +0300 Subject: [PATCH] Fixes incorrect slashes used in URL on Windows Addresses issue #124 (https://github.com/kelproject/pykube/issues/124) --- pykube/objects.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pykube/objects.py b/pykube/objects.py index e24f1b7..2ac4dbc 100644 --- a/pykube/objects.py +++ b/pykube/objects.py @@ -68,7 +68,7 @@ def api_kwargs(self, **kwargs): kw["url"] = self.endpoint else: operation = kwargs.pop("operation", "") - kw["url"] = op.normpath(op.join(self.endpoint, self.name, operation)) + kw["url"] = op.normpath(op.join(self.endpoint, self.name, operation)).replace("\\", "/") params = kwargs.pop("params", None) if params is not None: query_string = urlencode(params)