diff options
Diffstat (limited to 'demos/demo_keygen.py')
-rwxr-xr-x | demos/demo_keygen.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/demos/demo_keygen.py b/demos/demo_keygen.py index 12637ed0..590a0c4f 100755 --- a/demos/demo_keygen.py +++ b/demos/demo_keygen.py @@ -26,7 +26,6 @@ from optparse import OptionParser from paramiko import DSSKey from paramiko import RSAKey from paramiko.ssh_exception import SSHException -from paramiko.py3compat import u usage = """ %prog [-v] [-b bits] -t type [-N new_passphrase] [-f output_keyfile]""" @@ -144,9 +143,7 @@ if __name__ == "__main__": raise SSHException("DSA Keys must be 1024 bits") if ktype not in key_dispatch_table: - raise SSHException( - "Unknown %s algorithm to generate keys pair" % ktype - ) + raise SSHException("Unknown %s algorithm to generate keys pair" % ktype) # generating private key prv = key_dispatch_table[ktype].generate(bits=bits, progress_func=pfunc) @@ -162,7 +159,7 @@ if __name__ == "__main__": if options.verbose: print("done.") - hash = u(hexlify(pub.get_fingerprint())) + hash = hexlify(pub.get_fingerprint()).decode() print( "Fingerprint: %d %s %s.pub (%s)" % ( |