changeset 5956:70f8fba1f28a

repos: fix unicode error when scanning and finding repositories with unicode names
author Mads Kiilerich <madski@unity3d.com>
date Fri, 10 Jun 2016 01:19:58 +0200
parents f0cdd5efc867
children 104ec4bfe449
files kallithea/lib/utils.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/lib/utils.py	Fri Jun 10 01:19:58 2016 +0200
+++ b/kallithea/lib/utils.py	Fri Jun 10 01:19:58 2016 +0200
@@ -215,7 +215,7 @@
     """
 
     # remove ending slash for better results
-    path = path.rstrip(os.sep)
+    path = safe_str(path.rstrip(os.sep))
     log.debug('now scanning in %s location recursive:%s...', path, recursive)
 
     def _get_repos(p):
@@ -233,7 +233,7 @@
             if skip_removed_repos and REMOVED_REPO_PAT.match(dirpath):
                 continue
 
-            #skip .<something> dirs
+            #skip .<something> dirs TODO: rly? then we should prevent creating them ...
             if dirpath.startswith('.'):
                 continue