summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/services/soledad/soledadbootstrapper.py
diff options
context:
space:
mode:
authorTomás Touceda <chiiph@leap.se>2013-10-29 13:03:53 -0300
committerTomás Touceda <chiiph@leap.se>2013-10-29 13:03:53 -0300
commitdba45ace351caa4c097f1ee1498e164cf4683a4f (patch)
tree7269328783217abe12cd9e730fa4e564a13c5521 /src/leap/bitmask/services/soledad/soledadbootstrapper.py
parent49db36a361a6fe027f2fffacf52d715b11cbdb52 (diff)
parentc90be9157d5423d055984b354c5712f6873336b8 (diff)
Merge remote-tracking branch 'ivan/bug/4189_fix-non-ascii-path-problem' into develop
Diffstat (limited to 'src/leap/bitmask/services/soledad/soledadbootstrapper.py')
-rw-r--r--src/leap/bitmask/services/soledad/soledadbootstrapper.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/leap/bitmask/services/soledad/soledadbootstrapper.py b/src/leap/bitmask/services/soledad/soledadbootstrapper.py
index 1940fc68..fec60338 100644
--- a/src/leap/bitmask/services/soledad/soledadbootstrapper.py
+++ b/src/leap/bitmask/services/soledad/soledadbootstrapper.py
@@ -20,6 +20,7 @@ Soledad bootstrapping
import logging
import os
import socket
+import sys
from ssl import SSLError
@@ -241,14 +242,15 @@ class SoledadBootstrapper(AbstractBootstrapper):
"""
# TODO: If selected server fails, retry with another host
# (issue #3309)
+ encoding = sys.getfilesystemencoding()
try:
self._soledad = Soledad(
uuid,
- self._password.encode("utf-8"),
- secrets_path=secrets_path,
- local_db_path=local_db_path,
+ self._password.encode('utf-8'),
+ secrets_path=secrets_path.encode(encoding),
+ local_db_path=local_db_path.encode(encoding),
server_url=server_url,
- cert_file=cert_file,
+ cert_file=cert_file.encode(encoding),
auth_token=auth_token)
# XXX All these errors should be handled by soledad itself,
@@ -414,9 +416,9 @@ class SoledadBootstrapper(AbstractBootstrapper):
:param provider_config: Provider configuration
:type provider_config: ProviderConfig
:param user: User's login
- :type user: str
+ :type user: unicode
:param password: User's password
- :type password: str
+ :type password: unicode
:param download_if_needed: If True, it will only download
files if the have changed since the
time it was previously downloaded.