mirror of
https://github.com/gryf/boxpy.git
synced 2025-12-19 21:47:59 +01:00
Fix issue with undefined port.
This commit is contained in:
3
box.py
3
box.py
@@ -653,8 +653,7 @@ class VBoxManage:
|
|||||||
if not self.uuid:
|
if not self.uuid:
|
||||||
raise BoxVBoxFailure(f'Cannot create VM "{self.name_or_uuid}".')
|
raise BoxVBoxFailure(f'Cannot create VM "{self.name_or_uuid}".')
|
||||||
|
|
||||||
if not conf.port:
|
port = conf.port if conf.port else self._find_unused_port()
|
||||||
port = self._find_unused_port()
|
|
||||||
|
|
||||||
cmd = ['vboxmanage', 'modifyvm', self.name_or_uuid,
|
cmd = ['vboxmanage', 'modifyvm', self.name_or_uuid,
|
||||||
'--memory', str(memory),
|
'--memory', str(memory),
|
||||||
|
|||||||
Reference in New Issue
Block a user