Thursday, April 16, 2020

[389-commits] [389-ds-base] branch 389-ds-base-1.4.2 updated: Issue 50337 - Replace exec() with setattr()

This is an automated email from the git hooks/post-receive script.

mreynolds pushed a commit to branch 389-ds-base-1.4.2
in repository 389-ds-base.

The following commit(s) were added to refs/heads/389-ds-base-1.4.2 by this push:
new 1ff7548 Issue 50337 - Replace exec() with setattr()
1ff7548 is described below

commit 1ff7548843aad1e370e32144088efa280d7922d2
Author: Viktor Ashirov <vashirov@redhat.com>
AuthorDate: Fri Apr 3 15:16:55 2020 +0200

Issue 50337 - Replace exec() with setattr()

Bug Description:
Instance IDs now include superfluous quotes that break
calling CLI tools from lib389.

Fix Description:
Remove the quotes.

Fixes: https://pagure.io/389-ds-base/issue/50337

Reviewed by: spichugi (Thanks!)
---
src/lib389/lib389/_constants.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/lib389/lib389/_constants.py b/src/lib389/lib389/_constants.py
index 086a722..a1729c3 100644
--- a/src/lib389/lib389/_constants.py
+++ b/src/lib389/lib389/_constants.py
@@ -294,7 +294,7 @@ for i in range(port_start, port_start + number_of_instances):
setattr(mod, "HOST_STANDALONE{0}".format(N), "LOCALHOST")
setattr(mod, "PORT_STANDALONE{0}".format(N), i)
setattr(mod, "SECUREPORT_STANDALONE{0}".format(N), i + 24700)
- setattr(mod, "SERVERID_STANDALONE{0}".format(N), "\"standalone{0}\"".format(N))
+ setattr(mod, "SERVERID_STANDALONE{0}".format(N), "standalone{0}".format(N))
setattr(mod, "REPLICAID_STANDALONE_{0}".format(N), 65535)

# For compatibility
@@ -311,7 +311,7 @@ for i in range(port_start, port_start + number_of_instances):
setattr(mod, "HOST_MASTER_{0}".format(N), "LOCALHOST")
setattr(mod, "PORT_MASTER_{0}".format(N), i)
setattr(mod, "SECUREPORT_MASTER_{0}".format(N), i + 24700)
- setattr(mod, "SERVERID_MASTER_{0}".format(N), "\"master{0}\"".format(N))
+ setattr(mod, "SERVERID_MASTER_{0}".format(N), "master{0}".format(N))
setattr(mod, "REPLICAID_MASTER_{0}".format(N), N)

# Replication topology - hubs
@@ -322,7 +322,7 @@ for i in range(port_start, port_start + number_of_instances):
setattr(mod, "HOST_HUB_{0}".format(N), "LOCALHOST")
setattr(mod, "PORT_HUB_{0}".format(N), i)
setattr(mod, "SECUREPORT_HUB_{0}".format(N), i + 24700)
- setattr(mod, "SERVERID_HUB_{0}".format(N), "\"hub{0}\"".format(N))
+ setattr(mod, "SERVERID_HUB_{0}".format(N), "hub{0}".format(N))
setattr(mod, "REPLICAID_HUB_{0}".format(N), 65535)

# Replication topology - consumers
@@ -333,7 +333,7 @@ for i in range(port_start, port_start + number_of_instances):
setattr(mod, "HOST_CONSUMER_{0}".format(N), "LOCALHOST")
setattr(mod, "PORT_CONSUMER_{0}".format(N), i)
setattr(mod, "SECUREPORT_CONSUMER_{0}".format(N), i + 24700)
- setattr(mod, "SERVERID_CONSUMER_{0}".format(N), "\"consumer{0}\"".format(N))
+ setattr(mod, "SERVERID_CONSUMER_{0}".format(N), "consumer{0}".format(N))

# Cleanup, we don't need to export that
del N, port_start, number_of_instances

--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
_______________________________________________
389-commits mailing list -- 389-commits@lists.fedoraproject.org
To unsubscribe send an email to 389-commits-leave@lists.fedoraproject.org
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/389-commits@lists.fedoraproject.org

No comments:

Post a Comment