Commit c21fa62c authored by Nicolas Delaby's avatar Nicolas Delaby

Older versions of pysvn returns unicode instead of string.

Force encoding into utf-8


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@44253 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 2b7ce4a4
...@@ -141,6 +141,11 @@ try: ...@@ -141,6 +141,11 @@ try:
if not username or not password: if not username or not password:
self.client.setException(SubversionLoginError(realm)) self.client.setException(SubversionLoginError(realm))
return False, '', '', False return False, '', '', False
# BBB. support older versions of pysvn <= 1.6.3
if isinstance(user, unicode):
user = user.encode('utf-8')
if isinstance(password, unicode):
password = password.encode('utf-8')
return True, user, password, False return True, user, password, False
class NotifyCallback(Callback): class NotifyCallback(Callback):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment