Sfoglia il codice sorgente

misc. small fixes, discovered by pycharm

removed unused import
fixed format string
Thomas Waldmann 10 anni fa
parent
commit
61f84efa60
2 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 1 1
      attic/key.py
  2. 1 1
      attic/testsuite/key.py

+ 1 - 1
attic/key.py

@@ -608,7 +608,7 @@ def get_implementations(meta):
         maccer = maccer_mapping[meta.mac_type]
         cipher = cipher_mapping[meta.cipher_type]
     except KeyError:
-        raise UnsupportedPayloadError("compr_type %x key_type %x mac_type %x" % (
+        raise UnsupportedPayloadError("compr_type %x key_type %x mac_type %x cipher_type %x" % (
             meta.compr_type, meta.key_type, meta.mac_type, meta.cipher_type))
     return compressor, keyer, maccer, cipher
 

+ 1 - 1
attic/testsuite/key.py

@@ -3,7 +3,7 @@ import re
 import shutil
 import tempfile
 from binascii import hexlify
-from attic.crypto import bytes_to_long, num_aes_blocks
+from attic.crypto import bytes_to_long
 from attic.testsuite import AtticTestCase
 from attic.key import PlaintextKey, PassphraseKey, KeyfileKey, COMPR_DEFAULT
 from attic.helpers import Location, unhexlify