python-sshpubkeys icon indicating copy to clipboard operation
python-sshpubkeys copied to clipboard

Issue with parse function

Open ajoseph-godaddy opened this issue 2 years ago • 0 comments

Using the latest version I am having a problem using the parse function that was working under python2 previously.

  File "/opt/ssh_key_deploy.py", line 321, in <module>
    main()
  File "/opt/ssh_key_deploy.py", line 316, in main
    key_deploy.get_ssh_keys()
  File "/opt/ssh_key_deploy.py", line 191, in get_ssh_keys
    ssh.parse()
  File "/usr/local/lib/python3.9/site-packages/sshpubkeys/keys.py", line 457, in parse
    if keydata.startswith("---- BEGIN SSH2 PUBLIC KEY ----"):
TypeError: startswith first arg must be bytes or a tuple of bytes, not str

Do you have any thoughts or assistance?

ajoseph-godaddy avatar Apr 21 '22 17:04 ajoseph-godaddy