Skip to content

Commit

Permalink
fix PodmanPod find
Browse files Browse the repository at this point in the history
  • Loading branch information
hartmans committed Aug 15, 2024
1 parent ed39f30 commit 7052146
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions carthage/podman/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ def __init__(self, **kwargs):
self.injector.add_provider(InjectionKey(PodmanPod), dependency_quote(self))
self.network_links = {}
self.container_host = None

async def find(self):
if not self.container_host:
await self.ainjector(instantiate_container_host, self)
Expand All @@ -229,6 +230,8 @@ async def find(self):
except sh.ErrorReturnCode:
return False
pod_info = json.loads(str(result.stdout, 'utf-8'))
if isinstance(pod_info, list):
pod_info = pod_info[0]
self.pod_info = pod_info
return dateutil.parser.isoparse(pod_info['Created']).timestamp()

Expand Down

0 comments on commit 7052146

Please sign in to comment.