summaryrefslogtreecommitdiff
path: root/client/src/leap
diff options
context:
space:
mode:
authorVictor Shyba <victor1984@riseup.net>2017-03-02 20:24:33 -0300
committerdrebs <drebs@leap.se>2017-04-04 18:27:32 +0200
commit1928670f38c1ffcf1570402acd241ce173c53013 (patch)
tree185356ca52314c313ba14185bd442593dbf00f47 /client/src/leap
parent943fbba160f49971e33d7696f2999f97734eb291 (diff)
[style] pep8 fixes
Diffstat (limited to 'client/src/leap')
-rw-r--r--client/src/leap/soledad/client/_blobs.py3
-rw-r--r--client/src/leap/soledad/client/_crypto.py9
2 files changed, 5 insertions, 7 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: