Makes sense! What that code does with plain text for py3 is
base64.encode_as_bytes(plaintext) which results in bytes:

  >>> from oslo_serialization import base64
  >>> base64.encode_as_bytes('hello')
  b'aGVsbG8='

Basically what that does is:

  >>> base64.b64encode('hello'.encode('utf-8'))
  b'aGVsbG8='

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1799746

Title:
  PY3: when uploading file as secret: TypeError: a bytes-like object is
  required, not 'str'

To manage notifications about this bug go to:
https://bugs.launchpad.net/castellan/+bug/1799746/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to