Indeed, as voltsandjolts shows, by catching the exception and either doing nothing or printing a warning.
A better solution would be to prevent the error from occurring. In the case of timeouts the solution is either to increase the vxi-11 timeout or make the commands take shorter. For increasing the timeout, if you're using the Python VXI-11 module directly (as opposed to through PyVISA or python-ivi), something like:
instrument.timeout = 60
Should help.
To make commands faster it can help to switch from waiting until a slow command is finished to starting the command, then periodically checking the status registers if the command is done, and only fetching the results when you know they're ready. Alternatively triggering the command, then sleeping for some time, and then fetching the results can also work. For this you need to study the specific instrument if it supports that. SCPI DMMs do via initiate and fetch? commands.