net.py: typo fix + catch the right exception