diff --git a/borg/archiver.py b/borg/archiver.py index 6df53482c..711658589 100644 --- a/borg/archiver.py +++ b/borg/archiver.py @@ -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) diff --git a/borg/helpers.py b/borg/helpers.py index 62694e0a1..7d592952c 100644 --- a/borg/helpers.py +++ b/borg/helpers.py @@ -1,5 +1,4 @@ import argparse -import binascii from collections import namedtuple from functools import wraps import grp diff --git a/borg/key.py b/borg/key.py index 4cf4a955b..82dbf3c77 100644 --- a/borg/key.py +++ b/borg/key.py @@ -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]) diff --git a/borg/locking.py b/borg/locking.py index 99d20641b..bf7ed6032 100644 --- a/borg/locking.py +++ b/borg/locking.py @@ -1,4 +1,3 @@ -import errno import json import os import socket diff --git a/borg/remote.py b/borg/remote.py index a836ac2c7..6ddc3f1c2 100644 --- a/borg/remote.py +++ b/borg/remote.py @@ -7,7 +7,6 @@ import shlex from subprocess import Popen, PIPE import sys import tempfile -import traceback from . import __version__ diff --git a/borg/upgrader.py b/borg/upgrader.py index d836c57aa..7f88fa600 100644 --- a/borg/upgrader.py +++ b/borg/upgrader.py @@ -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 diff --git a/docs/global.rst.inc b/docs/global.rst.inc index 439b71d1a..d34f09651 100644 --- a/docs/global.rst.inc +++ b/docs/global.rst.inc @@ -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>