From aa9b0460a9320a0ec12e45e75011fce6b102ac58 Mon Sep 17 00:00:00 2001 From: Ivan Alejandro Date: Thu, 24 Oct 2013 17:19:30 -0300 Subject: Encode paths before use them. --- src/leap/bitmask/services/soledad/soledadbootstrapper.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/leap/bitmask/services/soledad') diff --git a/src/leap/bitmask/services/soledad/soledadbootstrapper.py b/src/leap/bitmask/services/soledad/soledadbootstrapper.py index 4619ba80..3bb5fd84 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 @@ -239,14 +240,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, -- cgit v1.2.3 From c90be9157d5423d055984b354c5712f6873336b8 Mon Sep 17 00:00:00 2001 From: Ivan Alejandro Date: Tue, 29 Oct 2013 12:24:45 -0300 Subject: Update docstrings to unicode types. --- src/leap/bitmask/services/soledad/soledadbootstrapper.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/leap/bitmask/services/soledad') diff --git a/src/leap/bitmask/services/soledad/soledadbootstrapper.py b/src/leap/bitmask/services/soledad/soledadbootstrapper.py index 3bb5fd84..c673ea61 100644 --- a/src/leap/bitmask/services/soledad/soledadbootstrapper.py +++ b/src/leap/bitmask/services/soledad/soledadbootstrapper.py @@ -414,9 +414,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. -- cgit v1.2.3