summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJake Yip <jake.yip@ardc.edu.au>2022-03-18 16:01:02 +1100
committerJake Yip <jake.yip@ardc.edu.au>2022-03-18 16:01:52 +1100
commitafec310e3fc7ec3f23c04f183bf7ddb5efd6d830 (patch)
treeaa5d2c5265fe592296e8b86f85342a953b0abecc
parent433f541b970981d09c0917588b14eea293ea50dd (diff)
downloadkeystone-afec310e3fc7ec3f23c04f183bf7ddb5efd6d830.tar.gz
Update TOTP example code for python 3
Change-Id: I8e16fe1a002295753ab03cb8da74c0d43785f6d7
-rw-r--r--doc/source/admin/auth-totp.rst4
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/source/admin/auth-totp.rst b/doc/source/admin/auth-totp.rst
index 3c331be96..c77ca64a0 100644
--- a/doc/source/admin/auth-totp.rst
+++ b/doc/source/admin/auth-totp.rst
@@ -40,8 +40,8 @@ secret:
.. code-block:: python
import base64
- message = '1234567890123456'
- print base64.b32encode(message).rstrip('=')
+ message = b'1234567890123456'
+ print(base64.b32encode(message).rstrip(b'='))
Example output::