mirror of
https://github.com/gryf/boxpy.git
synced 2025-12-19 13:37:58 +01:00
Do not overwrite previously set options.
If user doesn't provide options from commandline during rebuild, such option will be overwritten by those stored in VM XML, even if user change such option in config file. This commit fixing that.
This commit is contained in:
2
box.py
2
box.py
@@ -273,7 +273,7 @@ class Config:
|
|||||||
# the command line
|
# the command line
|
||||||
vm_info = vbox.get_vm_info() if vbox else {}
|
vm_info = vbox.get_vm_info() if vbox else {}
|
||||||
for attr in self.ATTRS:
|
for attr in self.ATTRS:
|
||||||
val = getattr(args, attr, None) or vm_info.get(attr)
|
val = getattr(args, attr, None)
|
||||||
if not val:
|
if not val:
|
||||||
continue
|
continue
|
||||||
setattr(self, attr, str(val))
|
setattr(self, attr, str(val))
|
||||||
|
|||||||
Reference in New Issue
Block a user