The packages 'pyserial' and 'serial' both use the 'serial' namespace. Therefore, import serial will succeed if the user has the latter package installed, even though PSL needs the former. This results in an unhelpful "Could not connect" RuntimeError down the line.
With this change, PSL verifies that the correct 'serial' was imported, and complains otherwise.
The packages 'pyserial' and 'serial' both use the 'serial' namespace. Therefore,
import serial
will succeed if the user has the latter package installed, even though PSL needs the former. This results in an unhelpful "Could not connect" RuntimeError down the line.With this change, PSL verifies that the correct 'serial' was imported, and complains otherwise.