mirror of
https://github.com/romanz/amodem.git
synced 2026-04-21 13:46:30 +08:00
gpg: fix pep8/pylint warning
This commit is contained in:
@@ -5,7 +5,6 @@ import hashlib
|
|||||||
import io
|
import io
|
||||||
import logging
|
import logging
|
||||||
import struct
|
import struct
|
||||||
import subprocess
|
|
||||||
|
|
||||||
import ecdsa
|
import ecdsa
|
||||||
import ed25519
|
import ed25519
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
import logging
|
import logging
|
||||||
import time
|
import time
|
||||||
|
|
||||||
from . import decode, keyring, proto
|
from . import keyring, proto
|
||||||
from .. import client, factory, formats, util
|
from .. import client, factory, formats, util
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
"""Tools for doing signature using gpg-agent."""
|
"""Tools for doing signature using gpg-agent."""
|
||||||
|
|
||||||
import argparse
|
|
||||||
import binascii
|
import binascii
|
||||||
import io
|
import io
|
||||||
import logging
|
import logging
|
||||||
@@ -147,7 +146,8 @@ def get_public_key(user_id, use_custom=False):
|
|||||||
args = ['gpg2', '--export'] + ([user_id] if user_id else [])
|
args = ['gpg2', '--export'] + ([user_id] if user_id else [])
|
||||||
pubkey_bytes = subprocess.check_output(args=args)
|
pubkey_bytes = subprocess.check_output(args=args)
|
||||||
if pubkey_bytes:
|
if pubkey_bytes:
|
||||||
return decode.load_public_key(io.BytesIO(pubkey_bytes), use_custom=use_custom)
|
return decode.load_public_key(io.BytesIO(pubkey_bytes),
|
||||||
|
use_custom=use_custom)
|
||||||
else:
|
else:
|
||||||
log.error('could not find public key %r in local GPG keyring', user_id)
|
log.error('could not find public key %r in local GPG keyring', user_id)
|
||||||
raise KeyError(user_id)
|
raise KeyError(user_id)
|
||||||
|
|||||||
Reference in New Issue
Block a user