1
0
mirror of https://github.com/gryf/boxpy.git synced 2025-12-18 21:10:17 +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:
2021-06-20 14:30:20 +02:00
parent cbb0c6b5af
commit 8b28914deb

2
box.py
View File

@@ -273,7 +273,7 @@ class Config:
# the command line
vm_info = vbox.get_vm_info() if vbox else {}
for attr in self.ATTRS:
val = getattr(args, attr, None) or vm_info.get(attr)
val = getattr(args, attr, None)
if not val:
continue
setattr(self, attr, str(val))