From 9005ba96eceed0e5712a0824cc707b98310cc483 Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Wed, 6 May 2020 14:57:42 +0200 Subject: [PATCH] Doc: Use bytes for attribute values in example https://github.com/python-ldap/python-ldap/pull/317 Fixes: https://github.com/python-ldap/python-ldap/issues/306 --- Doc/reference/ldif.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Doc/reference/ldif.rst b/Doc/reference/ldif.rst index c508f7d..87dcb70 100644 --- a/Doc/reference/ldif.rst +++ b/Doc/reference/ldif.rst @@ -61,11 +61,11 @@ Example The following example demonstrates how to write LDIF output of an LDAP entry with :mod:`ldif` module. ->>> import sys,ldif ->>> entry={'objectClass':['top','person'],'cn':['Michael Stroeder'],'sn':['Stroeder']} +>>> import sys, ldif +>>> entry={'objectClass': [b'top', b'person'], 'cn': [b'Michael Stroeder'], 'sn': [b'Stroeder']} >>> dn='cn=Michael Stroeder,ou=Test' >>> ldif_writer=ldif.LDIFWriter(sys.stdout) ->>> ldif_writer.unparse(dn,entry) +>>> ldif_writer.unparse(dn, entry) dn: cn=Michael Stroeder,ou=Test cn: Michael Stroeder objectClass: top