localrepo: fix encoding problems with Python3

6 jobs for localrepo-fix
in 2 minutes and 59 seconds and was queued for 9 seconds