Fix bug in python3 prepareNetNameQuery