Comment 6 for bug 1799746

Revision history for this message
Corey Bryant (corey.bryant) wrote : Re: when uploading file as secret: TypeError: a bytes-like object is required, not 'str'

This works better:

corey@corey-ThinkPad-T440s:~/pkg/rocky/upstream/castellan/castellan/key_manager$ python3
Python 3.6.7rc1 (default, Sep 27 2018, 09:51:25)
[GCC 8.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import binascii
>>> binascii.hexlify('string'.encode('utf-8'))
b'737472696e67'
>>> quit()

corey@corey-ThinkPad-T440s:~/pkg/rocky/upstream/castellan/castellan/key_manager$ python2
Python 2.7.15+ (default, Oct 2 2018, 22:12:08)
[GCC 8.2.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import binascii
>>> binascii.hexlify('string'.encode('utf-8'))
'737472696e67'