Dear Eric, Sascha Silbe <si...@linux.vnet.ibm.com> writes:
> result = self.vm.qmp('blockdev-change-medium', > id=self.device_name or 'drive0', > filename=new_img, > format=iotests.imgfmt) Sorry, my eyes deceived me. I thought the original code was setting the "id" parameter in both cases. QEMUMachine.qmp() and QEMUMonitorProtocol.cmd() together translate the keyword arguments directly into QMP arguments, so passing None is different from not passing anything at all. The if/else is probably the best approach in that case; everything else I can think of would just be more complicated. Sascha -- Softwareentwicklung Sascha Silbe, Niederhofenstraße 5/1, 71229 Leonberg https://se-silbe.de/ USt-IdNr. DE281696641