summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--client/src/leap/soledad/client/_blobs.py3
-rw-r--r--client/src/leap/soledad/client/_crypto.py9
-rw-r--r--server/src/leap/soledad/server/_blobs.py4
3 files changed, 7 insertions, 9 deletions
diff --git a/client/src/leap/soledad/client/_blobs.py b/client/src/leap/soledad/client/_blobs.py
index 336fe9af..2cc06146 100644
--- a/client/src/leap/soledad/client/_blobs.py
+++ b/client/src/leap/soledad/client/_blobs.py
@@ -300,7 +300,8 @@ def testit(reactor):
# parse command line arguments
import argparse
- usage = "\n mkdir /tmp/blobs/user && cd server/src/leap/soledad/server/ && python _blobs.py" \
+ usage = "\n mkdir /tmp/blobs/user && cd server/src/leap/soledad/server/" \
+ " && python _blobs.py" \
"\n python _blobs.py upload /path/to/file blob_id" \
"\n python _blobs.py download blob_id"
diff --git a/client/src/leap/soledad/client/_crypto.py b/client/src/leap/soledad/client/_crypto.py
index 3eef2f65..c152502d 100644
--- a/client/src/leap/soledad/client/_crypto.py
+++ b/client/src/leap/soledad/client/_crypto.py
@@ -51,18 +51,15 @@ decrypt(PAYLOAD)
"""
-import binascii
import base64
import hashlib
import warnings
import hmac
import os
-import re
import struct
import time
from io import BytesIO
-from six.moves import map as imap
from collections import namedtuple
from twisted.internet import defer
@@ -352,8 +349,8 @@ class CryptoStreamBodyProducer(FileBodyProducer):
yield None
-# TODO maybe rename this to just Decryptor, since it will be used by blobs an non
-# blobs in soledad.
+# TODO maybe rename this to just Decryptor, since it will be used by blobs
+# and non blobs in soledad.
class BlobDecryptor(object):
"""
Decrypts an encrypted blob associated with a given Document.
@@ -401,7 +398,7 @@ class BlobDecryptor(object):
encoded_preamble = parts[0]
preamble = base64.urlsafe_b64decode(encoded_preamble)
- except (TypeError, ValueError) as exc:
+ except (TypeError, ValueError):
raise InvalidBlob
try:
diff --git a/server/src/leap/soledad/server/_blobs.py b/server/src/leap/soledad/server/_blobs.py
index b0d065d9..f048fb6f 100644
--- a/server/src/leap/soledad/server/_blobs.py
+++ b/server/src/leap/soledad/server/_blobs.py
@@ -157,8 +157,8 @@ class BlobsResource(resource.Resource):
factorykls = getattr(self, backend + 'Class')(**opts)
self._handler = kls()
"""
- resource.Resource.__init__(self)
- self._blobs_path = blobs_path
+ resource.Resource.__init__(self)
+ self._blobs_path = blobs_path
self._handler = self.blobsFactoryClass()
assert IBlobsBackend.providedBy(self._handler)