[tor-commits] [pyonionoo/master] Raise proper exceptions, cleanup code