Skip to content

Commit

Permalink
Fix broken print() migration
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Heimes <cheimes@redhat.com>
  • Loading branch information
Christian Heimes authored and Petr Viktorin committed Jun 5, 2020
1 parent ed802af commit a8fd053
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
14 changes: 7 additions & 7 deletions Demo/pyasn1/readentrycontrol.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
serverctrls = [pr]
)
_,_,_,resp_ctrls = l.result3(msg_id)
print("resp_ctrls[0].dn:",resp_ctrls[0].dn)
print("resp_ctrls[0].entry:";pprint.pprint(resp_ctrls[0].entry))
print("resp_ctrls[0].dn:", resp_ctrls[0].dn)
print("resp_ctrls[0].entry:", pprint.pformat(resp_ctrls[0].entry))

print("""#---------------------------------------------------------------------------
# Modify entry
Expand All @@ -56,7 +56,7 @@
)
_,_,_,resp_ctrls = l.result3(msg_id)
print("resp_ctrls[0].dn:",resp_ctrls[0].dn)
print("resp_ctrls[0].entry:";pprint.pprint(resp_ctrls[0].entry))
print("resp_ctrls[0].entry:",pprint.pformat(resp_ctrls[0].entry))

pr = PostReadControl(criticality=True,attrList=['uidNumber','gidNumber','entryCSN'])

Expand All @@ -67,7 +67,7 @@
)
_,_,_,resp_ctrls = l.result3(msg_id)
print("resp_ctrls[0].dn:",resp_ctrls[0].dn)
print("resp_ctrls[0].entry:";pprint.pprint(resp_ctrls[0].entry))
print("resp_ctrls[0].entry:",pprint.pformat(resp_ctrls[0].entry))

print("""#---------------------------------------------------------------------------
# Rename entry
Expand All @@ -83,7 +83,7 @@
)
_,_,_,resp_ctrls = l.result3(msg_id)
print("resp_ctrls[0].dn:",resp_ctrls[0].dn)
print("resp_ctrls[0].entry:";pprint.pprint(resp_ctrls[0].entry))
print("resp_ctrls[0].entry:",pprint.pformat(resp_ctrls[0].entry))

pr = PreReadControl(criticality=True,attrList=['uid'])
msg_id = l.rename(
Expand All @@ -94,7 +94,7 @@
)
_,_,_,resp_ctrls = l.result3(msg_id)
print("resp_ctrls[0].dn:",resp_ctrls[0].dn)
print("resp_ctrls[0].entry:";pprint.pprint(resp_ctrls[0].entry))
print("resp_ctrls[0].entry:",pprint.pformat(resp_ctrls[0].entry))

print("""#---------------------------------------------------------------------------
# Delete entry
Expand All @@ -108,4 +108,4 @@
)
_,_,_,resp_ctrls = l.result3(msg_id)
print("resp_ctrls[0].dn:",resp_ctrls[0].dn)
print("resp_ctrls[0].entry:";pprint.pprint(resp_ctrls[0].entry))
print("resp_ctrls[0].entry:",pprint.pformat(resp_ctrls[0].entry))
6 changes: 3 additions & 3 deletions Demo/pyasn1/sss_highest_number.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ class MyLDAPObject(LDAPObject,ResultProcessor):
except ldap.SIZELIMIT_EXCEEDED:
pass
# print result
print 'Highest value of %s' % (id_attr)
print('Highest value of %s' % (id_attr))
if ldap_result:
dn,entry = ldap_result[0]
print '->',entry[id_attr]
print('->',entry[id_attr])
else:
print 'not found'
print('not found')
6 changes: 3 additions & 3 deletions Demo/schema_tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ def PrintSchemaTree(schema,se_class,se_tree,se_oid,level):
"""ASCII text output for console"""
se_obj = schema.get_obj(se_class,se_oid)
if se_obj!=None:
print('| '*(level-1)+'+---'*(level>0), \)
', '.join(se_obj.names), \
'(%s)' % se_obj.oid
print('| '*(level-1)+'+---'*(level>0),
', '.join(se_obj.names),
'(%s)' % se_obj.oid)
for sub_se_oid in se_tree[se_oid]:
print('| '*(level+1))
PrintSchemaTree(schema,se_class,se_tree,sub_se_oid,level+1)
Expand Down

0 comments on commit a8fd053

Please sign in to comment.