Python SDK Question (3.0.4): openHardDisk() create UUID
Posted: 10. Aug 2009, 01:30
Hello - is this the right place for SDK questions? Not clear to me where is.
My question is about vbox.openHardDisk() using python. I'm trying to get it to create a new UUID automatically by setting setImageId=True and imageId to an "empty string", but setting ImageId to None or "" both return errors. Details appended.
What constitutes an "empty string" in python?
TIA.
Results in:
Using None instead of "' results in:
My question is about vbox.openHardDisk() using python. I'm trying to get it to create a new UUID automatically by setting setImageId=True and imageId to an "empty string", but setting ImageId to None or "" both return errors. Details appended.
What constitutes an "empty string" in python?
TIA.
Code: Select all
disk = vbox.openHardDisk(hddPath,
manager.constants.AccessMode_ReadWrite,
True, # SetImageId
"",
True, # SetParentId
""
)
Code: Select all
File "<XPCOMObject method 'openHardDisk'>", line 3, in openHardDisk
xpcom.Exception: 0x80070057 (Argument aImageId is empty)Code: Select all
File "<XPCOMObject method 'openHardDisk'>", line 3, in openHardDisk
xpcom.Exception: 0x80070057 (Argument aImageId is NULL)