Fix bug in genrepos.py