From f1a1cc31931bd29183d51c8dac46eef3b8953911 Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Mon, 29 Aug 2022 09:44:36 +0200 Subject: [PATCH] Fix encoding of the TOUCH value (python3) --- check_syncrepl_extended | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/check_syncrepl_extended b/check_syncrepl_extended index d6361b4..31eb280 100755 --- a/check_syncrepl_extended +++ b/check_syncrepl_extended @@ -46,7 +46,7 @@ from ldap.controls import SimplePagedResultsControl from ldap import modlist VERSION = '0.0' -TOUCH_VALUE = '%%TOUCH%%' +TOUCH_VALUE = b'%%TOUCH%%' parser = argparse.ArgumentParser( description=( @@ -204,10 +204,10 @@ parser.add_argument( type=str, help=( 'Touch attribute giving in parameter to force resync a this LDAP ' - f'object from provider. A value "{TOUCH_VALUE}" will be add to this ' - 'attribute and remove after. The user use to connect to the LDAP ' - 'directory must have write permission on this attribute on each ' - 'object.' + f'object from provider. A value "{TOUCH_VALUE.decode()}" will be ' + 'add to this attribute and remove after. The user use to connect ' + 'to the LDAP directory must have write permission on this ' + 'attribute on each object.' ), default=None )