diff --git a/silkaj/auth.py b/silkaj/auth.py index b46dfa32927087635e9a4db8645d546e94baa6c0..a71c437b6ccd242e831ec9f9f1c617fcac3d26a4 100644 --- a/silkaj/auth.py +++ b/silkaj/auth.py @@ -59,19 +59,13 @@ def generate_auth_file(file): authfile = Path(file) pubkey_cksum = display_pubkey_and_checksum(key.pubkey) if authfile.is_file(): - confirm( - "Would you like to erase " - + file - + " by an authfile corresponding to following pubkey `" - + pubkey_cksum - + "`?", - abort=True, - ) + message = f"Would you like to erase {file} by an authfile corresponding \n\ +to following pubkey `{pubkey_cksum}`?" + confirm(message, abort=True) key.save_seedhex_file(file) print( - "Authentication file 'authfile' generated and stored in current\ - folder for following public key:", - pubkey_cksum, + f"Authentication file 'authfile' generated and stored in current\ + folder for following public key: {pubkey_cksum}", ) @@ -86,7 +80,7 @@ def auth_by_auth_file(ctx): file = ctx.obj["AUTH_FILE_PATH"] authfile = Path(file) if not authfile.is_file(): - sys.exit('Error: the file "' + file + '" does not exist') + sys.exit(f"Error: `{file}` file does not exist") filetxt = authfile.open("r").read() # two regural expressions for the PubSec format