summaryrefslogtreecommitdiff
path: root/client/src/leap/soledad
diff options
context:
space:
mode:
authorIvan Alejandro <ivanalejandro0@gmail.com>2013-09-20 12:41:05 -0300
committerIvan Alejandro <ivanalejandro0@gmail.com>2013-09-20 12:41:05 -0300
commit8f8fe5483d95a3cb3a340c24de419c3b410bfa8f (patch)
tree2dfae7c660b5fc1d6fc1c939e3546c021cebf4a7 /client/src/leap/soledad
parent2d12d6bbeb351f2bb8eb65f30a441fcd429707c0 (diff)
parentb7cd2254d0b4062c302680b430e1684260718153 (diff)
Merge branch 'release-0.4.0'0.4.0
Diffstat (limited to 'client/src/leap/soledad')
-rw-r--r--client/src/leap/soledad/client/__init__.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/client/src/leap/soledad/client/__init__.py b/client/src/leap/soledad/client/__init__.py
index c6fbeac4..4c6a41fc 100644
--- a/client/src/leap/soledad/client/__init__.py
+++ b/client/src/leap/soledad/client/__init__.py
@@ -14,8 +14,6 @@
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-
"""
Soledad - Synchronization Of Locally Encrypted Data Among Devices.
@@ -25,22 +23,23 @@ implements (1) a SQLCipher backend for local storage in the client, (2) a
SyncTarget that encrypts data before syncing, and (3) a CouchDB backend for
remote storage in the server side.
"""
-
-import os
import binascii
-import logging
-import urlparse
-import simplejson as json
-import scrypt
+import errno
import httplib
+import logging
+import os
import socket
import ssl
-import errno
+import urlparse
from hashlib import sha256
+
from u1db.remote import http_client
from u1db.remote.ssl_match_hostname import match_hostname
+import scrypt
+import simplejson as json
+
from leap.common.config import get_path_prefix
#
@@ -346,8 +345,9 @@ class Soledad(object):
lambda x: os.path.dirname(x),
[self._local_db_path, self._secrets_path])
for path in paths:
- logger.info('Creating directory: %s.' % path)
try:
+ if not os.path.isdir(path):
+ logger.info('Creating directory: %s.' % path)
os.makedirs(path)
except OSError as exc:
if exc.errno == errno.EEXIST and os.path.isdir(path):