I advise you to return True or False after dealing with its result.
Otherwise, it is same as virsh.attach_disk.