mirror of
https://github.com/romanz/amodem.git
synced 2026-03-27 05:19:04 +08:00
gpg: use shutil.which() for Python 3
This commit is contained in:
@@ -129,8 +129,7 @@ def run_init(device_type, args):
|
||||
check_call(['mkdir', '-p', homedir])
|
||||
check_call(['chmod', '700', homedir])
|
||||
|
||||
agent_path = check_output(['which', '{}-gpg-agent'.format(device_name)])
|
||||
agent_path = agent_path.strip()
|
||||
agent_path = util.which('{}-gpg-agent'.format(device_name))
|
||||
|
||||
# Prepare GPG configuration file
|
||||
with open(os.path.join(homedir, 'gpg.conf'), 'w') as f:
|
||||
|
||||
Reference in New Issue
Block a user