gpg: use 'sys.exit' and log homedir

master
Roman Zeyde 6 years ago
parent 6363eb0d4a
commit 199fb299c3
No known key found for this signature in database
GPG Key ID: 87CAE5FA46917CBB

@ -127,8 +127,9 @@ def run_init(device_type, args):
log.info('GPG home directory: %s', homedir)
if os.path.exists(homedir):
log.error('GPG home directory exists, remove it manually if required')
exit(1)
log.error('GPG home directory %s exists, '
'remove it manually if required', homedir)
sys.exit(1)
check_call(['mkdir', '-p', homedir])
check_call(['chmod', '700', homedir])

Loading…
Cancel
Save