Ошибка при вычислении rid для репликаций #5

Open
opened 2021-09-21 17:01:08 +03:00 by icerider · 0 comments

Дробные числа у rid

`/etc/openldap/slapd.conf

syncrepl rid=1.0
    provider=ldap://testing.local
    type=refreshAndPersist
    retry="5 5 300 +"
    filter="(&(|(|(ou:dn:=Samba)(ou:dn:=Unix))(ou:dn:=Replication))(!(&(ou:dn:=Replication)(ou:dn:=Mail))))"
    searchbase="ou=Services,dc=calculate"
    attrs="*,+"
    schemachecking=on
    bindmethod=simple
    binddn="ou=Replication,ou=LDAP,ou=Services,dc=calculate"
    credentials=rl3421NNF
diff --git a/pym/cl_fill_server.py b/pym/cl_fill_server.py
index fb2c35b..81eea33 100644
--- a/pym/cl_fill_server.py
+++ b/pym/cl_fill_server.py
@@ -235,7 +235,7 @@ class fillVars(cl_base.glob_attr):
         for replServer in replServers:
             if replServer:
                 md5hex = hashlib.md5(replServer).hexdigest()
-                data8bit = "".join((str(int(x,16)/2) for x in list(md5hex)))
+                data8bit = "".join((str(int(x,16)//2) for x in list(md5hex)))
                 dStart = 0
                 dEnd = 3
                 dMax = 32
Дробные числа у rid `/etc/openldap/slapd.conf ``` syncrepl rid=1.0 provider=ldap://testing.local type=refreshAndPersist retry="5 5 300 +" filter="(&(|(|(ou:dn:=Samba)(ou:dn:=Unix))(ou:dn:=Replication))(!(&(ou:dn:=Replication)(ou:dn:=Mail))))" searchbase="ou=Services,dc=calculate" attrs="*,+" schemachecking=on bindmethod=simple binddn="ou=Replication,ou=LDAP,ou=Services,dc=calculate" credentials=rl3421NNF ``` ```diff diff --git a/pym/cl_fill_server.py b/pym/cl_fill_server.py index fb2c35b..81eea33 100644 --- a/pym/cl_fill_server.py +++ b/pym/cl_fill_server.py @@ -235,7 +235,7 @@ class fillVars(cl_base.glob_attr): for replServer in replServers: if replServer: md5hex = hashlib.md5(replServer).hexdigest() - data8bit = "".join((str(int(x,16)/2) for x in list(md5hex))) + data8bit = "".join((str(int(x,16)//2) for x in list(md5hex))) dStart = 0 dEnd = 3 dMax = 32 ```
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: calculate/calculate-utils-2.1-server#5
No description provided.