changeset 5735:f2075ef95ae2

unicode: Fix unicode conversion in repo2db_mapper
author Mads Kiilerich <madski@unity3d.com>
date Wed, 02 Mar 2016 00:14:31 +0100
parents d21305f7f166
children d8b6c876c609
files kallithea/lib/utils.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/lib/utils.py	Tue Mar 01 00:17:28 2016 +0100
+++ b/kallithea/lib/utils.py	Wed Mar 02 00:14:31 2016 +0100
@@ -543,8 +543,9 @@
 
     removed = []
     # remove from database those repositories that are not in the filesystem
+    unicode_initial_repo_list = set(safe_unicode(name) for name in initial_repo_list)
     for repo in sa.query(Repository).all():
-        if repo.repo_name not in initial_repo_list.keys():
+        if repo.repo_name not in unicode_initial_repo_list:
             if remove_obsolete:
                 log.debug("Removing non-existing repository found in db `%s`",
                           repo.repo_name)