Explorar el Código

fix some minor cosmetic code/docs issues

Thomas Waldmann hace 9 años
padre
commit
7773e632db
Se han modificado 7 ficheros con 2 adiciones y 9 borrados
  1. 0 2
      borg/archiver.py
  2. 0 1
      borg/helpers.py
  3. 2 2
      borg/key.py
  4. 0 1
      borg/locking.py
  5. 0 1
      borg/remote.py
  6. 0 1
      borg/upgrader.py
  7. 0 1
      docs/global.rst.inc

+ 0 - 2
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)

+ 0 - 1
borg/helpers.py

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

+ 2 - 2
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])

+ 0 - 1
borg/locking.py

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

+ 0 - 1
borg/remote.py

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

+ 0 - 1
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

+ 0 - 1
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>