Handling errors in a Python UDP proxy
On the face of it, what you're suggesting seems like it should work (although it may be implementation dependant since it depends on the OS socket API).  It also depends on what you mean by 'stripped down'.  Obviously, if you're doing something with the received packets that might throw an error you'll need to handle that as well.  Your catch would be better written as:

except socket.error:
    print ('Oops!')


As far as testing goes, you're sending to the same IP address so should be pretty safe but some things to try are:


Pull out / reconnect network cables
Turn off / reenable Wi-Fi
Disable / reenable network adapters
Send unexpectedly large packets (over your 4096 buffer size)
Try running multiple clients in constant send loops to see how your app handles large demand.