Skip to content

Commit bdd5cf4

Browse files
authored
Merge pull request #89 from sshnaidm/fixbu
Remove duplicate base_url set from args
2 parents 724cdb9 + 959b08b commit bdd5cf4

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ from podman import PodmanClient
2424

2525
uri = "unix:///run/user/1000/podman/podman.sock"
2626

27-
with PodmanClient(uri) as client:
27+
with PodmanClient(base_url=uri) as client:
2828
version = client.version()
2929
print("Release: ", version["Version"])
3030
print("Compatible API: ", version["ApiVersion"])

podman/client.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,10 @@ class PodmanClient(AbstractContextManager):
2828
2929
Examples:
3030
31-
with PodmanClient("ssh://[email protected]:22/run/podman/podman.sock?secure=True",
31+
with PodmanClient(base_url="ssh://[email protected]:22/run/podman/podman.sock?secure=True",
3232
identity="~alice/.ssh/api_ed25519")
3333
"""
34-
35-
def __init__(self, *args, **kwargs) -> None:
34+
def __init__(self, **kwargs) -> None:
3635
"""Initialize PodmanClient.
3736
3837
Keyword Args:
@@ -73,7 +72,7 @@ def __init__(self, *args, **kwargs) -> None:
7372
Path(xdg.BaseDirectory.get_runtime_dir(strict=False)) / "podman" / "podman.sock"
7473
)
7574
api_kwargs["base_url"] = "http+unix://" + path
76-
self.api = APIClient(*args, **api_kwargs)
75+
self.api = APIClient(**api_kwargs)
7776

7877
def __enter__(self) -> "PodmanClient":
7978
return self

0 commit comments

Comments
 (0)