From 71538bac28132a970ba5cf8f5ba94548c8cac7c0 Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Thu, 12 Sep 2013 14:08:50 +0200 Subject: reorder imports --- client/src/leap/soledad/client/__init__.py | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'client') diff --git a/client/src/leap/soledad/client/__init__.py b/client/src/leap/soledad/client/__init__.py index c6fbeac4..0976d346 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 . - - """ 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 # -- cgit v1.2.3 From f416fa8c80cab57aa26bc5c55bb26a9f1e62f248 Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Tue, 17 Sep 2013 18:17:42 -0400 Subject: remove redundant logging --- client/src/leap/soledad/client/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'client') diff --git a/client/src/leap/soledad/client/__init__.py b/client/src/leap/soledad/client/__init__.py index 0976d346..4c6a41fc 100644 --- a/client/src/leap/soledad/client/__init__.py +++ b/client/src/leap/soledad/client/__init__.py @@ -345,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): -- cgit v1.2.3