fix some minor cosmetic code/docs issues

This commit is contained in:
Thomas Waldmann 2016-01-30 00:01:13 +01:00
parent 695dc68479
commit 7773e632db
7 changed files with 2 additions and 9 deletions

View File

@ -139,8 +139,6 @@ class Archiver:
key_new.change_passphrase() # option to change key protection passphrase, save
return EXIT_SUCCESS
return EXIT_SUCCESS
def do_create(self, args):
"""Create new archive"""
matcher = PatternMatcher(fallback=True)

View File

@ -1,5 +1,4 @@
import argparse
import binascii
from collections import namedtuple
from functools import wraps
import grp

View File

@ -132,7 +132,7 @@ class AESKeyBase(KeyBase):
return b''.join((self.TYPE_STR, hmac, data))
def decrypt(self, id, data):
if not (data[0] == self.TYPE or \
if not (data[0] == self.TYPE or
data[0] == PassphraseKey.TYPE and isinstance(self, RepoKey)):
raise IntegrityError('Invalid encryption envelope')
hmac_given = memoryview(data)[1:33]
@ -149,7 +149,7 @@ class AESKeyBase(KeyBase):
return data
def extract_nonce(self, payload):
if not (payload[0] == self.TYPE or \
if not (payload[0] == self.TYPE or
payload[0] == PassphraseKey.TYPE and isinstance(self, RepoKey)):
raise IntegrityError('Invalid encryption envelope')
nonce = bytes_to_long(payload[33:41])

View File

@ -1,4 +1,3 @@
import errno
import json
import os
import socket

View File

@ -7,7 +7,6 @@ import shlex
from subprocess import Popen, PIPE
import sys
import tempfile
import traceback
from . import __version__

View File

@ -4,7 +4,6 @@ import logging
logger = logging.getLogger(__name__)
import os
import shutil
import sys
import time
from .helpers import get_keys_dir, get_cache_dir, ProgressIndicatorPercent

View File

@ -23,7 +23,6 @@
.. _llfuse: https://pypi.python.org/pypi/llfuse/
.. _homebrew: http://brew.sh/
.. _userspace filesystems: https://en.wikipedia.org/wiki/Filesystem_in_Userspace
.. _librelist: http://librelist.com/
.. _Cython: http://cython.org/
.. _virtualenv: https://pypi.python.org/pypi/virtualenv/
.. _mailing list discussion about internals: http://librelist.com/browser/attic/2014/5/6/questions-and-suggestions-about-inner-working-of-attic>