Closed SebaUbuntu closed 2 years ago
This is indeed a bug and your fix seems to be the right one. I was wandering if Address() constructor should raise two different exceptions, but it seems that is ok – when ALSA is called to do the conversion then keeping the ALSA error code seems the right thing to do, but when ALSA is not called then ValueError may still be raised.
Thank you.
This is indeed a bug and your fix seems to be the right one. I was wandering if Address() constructor should raise two different exceptions, but it seems that is ok – when ALSA is called to do the conversion then keeping the ALSA error code seems the right thing to do, but when ALSA is not called then ValueError may still be raised.
Thank you.
It may be better to reraise the exception if ALSAError message is not "Invalid argument"? For sure an ALSAError exception may be raised for some other reason, lmk
It may be better to reraise the exception if ALSAError message is not "Invalid argument"? For sure an ALSAError exception may be raised for some other reason, lmk
It is still just the address conversion that fails, I don't think there is even a possibility to get a different error there (this is implemented in the ALSA library, does not even go through the kernel driver) and even if there is, I don't think it needs to be handled specially at this point.
Change-Id: Ieadd1f74bf888fa8b07e84d09d013afbb2f39880