Skip to content

Commit e2d9d25

Browse files
committed
Fix: fix timeout tipe as int
Documentation and Annotations require timeout to be a float, but the API requires an integer. Signed-off-by: Nicola Sella <nsella@redhat.com>
1 parent a75e8c2 commit e2d9d25

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

podman/domain/pods.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
from podman.domain.manager import PodmanResource
77

8-
_Timeout = Union[None, float, tuple[float, float], tuple[float, None]]
8+
_Timeout = Union[None, int, tuple[int, int], tuple[int, None]]
99

1010
logger = logging.getLogger("podman.pods")
1111

podman/tests/unit/test_pod.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,15 +149,15 @@ def test_start(self, mock):
149149
def test_stop(self, mock):
150150
adapter = mock.post(
151151
tests.LIBPOD_URL
152-
+ "/pods/c8b9f5b17dc1406194010c752fc6dcb330192032e27648db9b14060447ecf3b8/stop?t=70.0",
152+
+ "/pods/c8b9f5b17dc1406194010c752fc6dcb330192032e27648db9b14060447ecf3b8/stop?t=70",
153153
json={
154154
"Errs": [],
155155
"Id": "c8b9f5b17dc1406194010c752fc6dcb330192032e27648db9b14060447ecf3b8",
156156
},
157157
)
158158

159159
pod = Pod(attrs=FIRST_POD, client=self.client.api)
160-
pod.stop(timeout=70.0)
160+
pod.stop(timeout=70)
161161
self.assertTrue(adapter.called_once)
162162

163163
@requests_mock.Mocker()

0 commit comments

Comments
 (0)