backends: fix potential unicode problems on debug logging.
This commit is contained in:
parent
26741dfe44
commit
71358e3f42
1 changed files with 5 additions and 2 deletions
|
|
@ -43,11 +43,14 @@ def get_vcs_instance(repo_path, *args, **kwargs):
|
|||
for the path it returns None. Arguments and keyword arguments are passed
|
||||
to the vcs backend repository class.
|
||||
"""
|
||||
from rhodecode.lib.utils2 import safe_str
|
||||
|
||||
explicit_vcs_alias = kwargs.pop('_vcs_alias', None)
|
||||
try:
|
||||
vcs_alias = explicit_vcs_alias or get_scm(repo_path)[0]
|
||||
vcs_alias = safe_str(explicit_vcs_alias or get_scm(repo_path)[0])
|
||||
log.debug(
|
||||
'Creating instance of %s repository from %s', vcs_alias, repo_path)
|
||||
'Creating instance of %s repository from %s', vcs_alias,
|
||||
safe_str(repo_path))
|
||||
backend = get_backend(vcs_alias)
|
||||
|
||||
if explicit_vcs_alias:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue