Skip to content

Commit

Permalink
Imporve find_ip_address
Browse files Browse the repository at this point in the history
  • Loading branch information
hartmans committed Nov 18, 2024
1 parent 3f4ceb3 commit daad70d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion carthage/vm.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ async def start_vm(self):
except NotImplementedError:
try:
await self._find_ip_address()
except e:
except Exception as e:
sh.virsh("destroy", self.full_name,
_bg=True, _bg_exc=False)
raise e from None
Expand Down Expand Up @@ -299,6 +299,10 @@ async def _find_ip_address(self):
continue
elif addr['ip-address'].startswith('169.25'):
continue
elif addr['ip-address'].startswith('::'):
continue
elif addr['ip-address'].startswith('127.'):
continue
self.ip_address = addr['ip-address']
return
await asyncio.sleep(3)
Expand Down

0 comments on commit daad70d

Please sign in to comment.