1
0
mirror of https://github.com/gryf/boxpy.git synced 2025-12-19 05:30:18 +01:00

Fix issue with undefined port.

This commit is contained in:
2021-07-06 19:50:31 +02:00
parent 2f7a37aaed
commit 2048455410

3
box.py
View File

@@ -653,8 +653,7 @@ class VBoxManage:
if not self.uuid:
raise BoxVBoxFailure(f'Cannot create VM "{self.name_or_uuid}".')
if not conf.port:
port = self._find_unused_port()
port = conf.port if conf.port else self._find_unused_port()
cmd = ['vboxmanage', 'modifyvm', self.name_or_uuid,
'--memory', str(memory),